File: colors.template

package info (click to toggle)
dotfile 1%3A2.4-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,472 kB
  • ctags: 523
  • sloc: tcl: 14,072; sh: 918; makefile: 177; lisp: 18; ansic: 7
file content (129 lines) | stat: -rw-r--r-- 4,338 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
### Copyright (C) 1995 Jeppe Buk (buk@imada.sdu.dk)
### This program is free software; you can redistribute it and/or modify
### it under the terms of the GNU General Public License as published by
### the Free Software Foundation; either version 2 of the License, or
### (at your option) any later version.
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
### GNU General Public License for more details.
###
### You should have received a copy of the GNU General Public License
### along with this program; if not, write to the Free Software
### Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

proc activeColors {} {
  # Colors / Active windows
  Desc "The color of active windows"
  ShortDesc "Color of active windows"

  # Find the names of all the defined colors
  set names [getColors]
  
  if {$names != {}} {
    # The colors have been found
    ListBox for -text "Foreground" -entries $names -selectmode single \
	-help "This is the foreground color of active windows"
    ListBox bac -text "Background" -entries $names -selectmode single \
	-help "This is the background color of active windows"
  } else {
    error "Unable to execute 'showrgb' (comes with X11)"
  }

  Save {
    if {$for(name) != {}} {print "HiForeColor\t$for(name)"}
    if {$bac(name) != {}} {print "HiBackColor\t$bac(name)"}
  }
}

proc inactiveColors {} {
  # Colors / Inactive windows
  Desc "The color of inactive, non-sticky windows"
  ShortDesc "Color of inactive windows"

  # Find the names of all the defined colors
  set names [getColors]
  
  if {$names != {}} {
    # The colors have been found
    ListBox for -text "Foreground" -entries $names -selectmode single \
	-help "This is the foreground color of inactive windows"
    ListBox bac -text "Background" -entries $names -selectmode single \
	-help "This is the background color of inactive windows"
  }

  Save {
    if {$for(name) != {}} {print "StdForeColor\t$for(name)"}
    if {$bac(name) != {}} {print "StdBackColor\t$bac(name)"}
  }
}

proc stickyColors {} {
  # Colors / Sticky windows
  Desc "The color of inactive, sticky windows"
  ShortDesc "Color of inactive, sticky windows"

  # Find the names of all the defined colors
  set names [getColors]
  
  if {$names != {}} {
    # The colors have been found
    ListBox for -text "Foreground" -entries $names -selectmode single \
	-help "This is the foreground color of sticky windows"
    ListBox bac -text "Background" -entries $names -selectmode single \
	-help "This is the background color of sticky windows"
  }

  Save {
    if {$for(name) != {}} {print "StickyForeColor\t$for(name)"}
    if {$bac(name) != {}} {print "StickyBackColor\t$bac(name)"}
  }
}

proc pagerColors {} {
  # Colors / Pager colors
  Desc "The color of the internal pager"
  ShortDesc "Color of the pager"

  # Find the names of all the defined colors
  set names [getColors]
  
  if {$names != {}} {
    # The colors have been found
    ListBox for -text "Foreground" -entries $names -selectmode single \
	-help "This is the foreground color of the internal pager"
    ListBox bac -text "Background" -entries $names -selectmode single \
	-help "This is the background color of the internal pager"
  }

  Save {
    if {$for(name) != {}} {print "PagerForeColor\t$for(name)"}
    if {$bac(name) != {}} {print "PagerBackColor\t$bac(name)"}
  }
}

proc menuColors {} {
  # Colors / Menu colors
  Desc "The color of the menus"
  ShortDesc "Color of the menus"

  # Find the names of all the defined colors
  set names [getColors]
  
  if {$names != {}} {
    # The colors have been found
    ListBox for -text "Foreground" -entries $names -selectmode single \
	-help "This is the foreground color of items on the menu"
    ListBox bac -text "Background" -entries $names -selectmode single \
	-help "This is the background color of the menu"
    ListBox stp -text "Inactive" -entries $names -selectmode single \
	-help "This is the foreground color of disabled items on the menu"
  }

  Save {
    if {$for(name) != {}} {print "MenuForeColor\t$for(name)"}
    if {$bac(name) != {}} {print "MenuBackColor\t$bac(name)"}
    if {$stp(name) != {}} {print "MenuStippleColor\t$stp(name)"}
  }
}