summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2014-01-30 17:27:55 +0000
committerNick White <git@njw.me.uk>2014-01-30 17:27:55 +0000
commit03a33a151138dc31681e42407ea3a8ab869bc038 (patch)
treed892ba42343d577123395b433722c1a5bf714dbe
parent170cc4b91cf6f7d6266363bd73ec55a3db9b60ff (diff)
downloadtkread-03a33a151138dc31681e42407ea3a8ab869bc038.tar.bz2
tkread-03a33a151138dc31681e42407ea3a8ab869bc038.zip
Colour selection nicely
-rwxr-xr-xtkread5
1 files changed, 3 insertions, 2 deletions
diff --git a/tkread b/tkread
index d078bcd..2dd8960 100755
--- a/tkread
+++ b/tkread
@@ -21,6 +21,7 @@ set fontsize 16
set textcolour #443322
set bgcolour #eeeee2
set outercolour #222222
+set selectbgcolour #ffffff
set inverttextcolour #eeeeee
set invertbgcolour #333030
set invertoutercolour #222222
@@ -156,7 +157,7 @@ if { [lsearch [font families] "$fontfamily"] == -1 } {
set fontfamily Times
}
. configure -bg $outercolour
-text .t -font "{$fontfamily} $fontsize" -wrap word -width 64 -padx [expr $fontsize * 3] -bg $bgcolour -fg $textcolour -relief flat
+text .t -font "{$fontfamily} $fontsize" -wrap word -width 64 -padx [expr $fontsize * 3] -bg $bgcolour -fg $textcolour -relief flat -inactiveselectbackground $selectbgcolour
pack .t -expand yes -fill y
set text [read stdin]
foreach arg $::argv {
@@ -169,7 +170,7 @@ foreach arg $::argv {
if { $domarkdown } {
markup .t
}
-.t configure -state disabled ;# disable cursor
+.t configure -state disabled ;# disable text insertion & cursor
bind . <Up> {scroll -1 unit}
bind . <k> {scroll -1 unit}