


ColorSwitch is a utility for configuring the basic colors of TkDesk, the excellent desktop manager by Christian Bolik. ColorSwitch provides a GUI that makes it easy to design, save and switch between different TkDesk color schemes.

ColorSwitch was written by Lionel Kirsher.


To use ColorSwitch you need:
	TkDesk 1.1 
	Tcl/Tk 8.x

__________________________________________________________
How it works:

Normally, you change the colors in TkDesk by editing the "~/.tkdesk/System" file. Under ColorSwitch, all of the color specifications in the System file (like #ffb8c5 or thistle4) are replaced with variables. The System file also includes a command to "source" a color settings file. This loads color values for all these variables. So that when TkDesk starts up, it uses the colors from the settings file.

ColorSwitch provides a graphical interface for designing and saving the color settings file. You may use an RGB color picker, select from the X11 named colors or enter hex values to choose colors for sixteen of TkDesks window features. 

ColorSwitch also lets you save and reload settings files.  This means you can completely re-color TkDesk with just a few mouse clicks. You can build a catalog of your favorite color schemes.


__________________________________________________________
What ColorSwitch does NOT do: 

ColorSwitch does not control the colors for directory and file listings in the browser/directory windows. You'll still need to edit them in the "FileTags" file. 
Be aware that some colors for the file listings might not look good--or even be visible--on a particular Listbox Backgound. Black text on a black background is not very useful.


__________________________________________________________
Installing ColorSwitch:

1. Move the ColorSwitch "ColorSets" directory to ~/.tkdesk/

	If you prefer to put it someplace else, you'll need to 
	edit line #28 of the ColorSwitch executable to include the
	correct path. (See the note in step #6.)
		
2. Edit line #29 of the ColorSwitch executable to include the correct
path to the "home directory," where the "ColorSwitch_Help" file lives.

	The default is "/usr/local/share/ColorSwitch" 

	
3. Save a copy of your current TkDesk System file. This makes it easy to get away from ColorSwitch if you ever need to. 
	
	# cp ~/.tkdesk/System System.BACKUP		

4. Open your ~/.tkdesk/System file in your favorite editor. From a TkDesk browser, you can choose TkDesk (menu) ->Configuration ->System.

5. Locate the following section...

   ### =========================================================================
   ###  Color Settings
   ### =========================================================================	 
   ...and delete everything in it, up to the start of the next section.
   
6. Copy the following (everything between the ====== bars) and paste in the empty Color Settings section of your System file.

	Note: Make sure the source command (first line) has the correct path
		for where you put the the "ColorSets" directory.

### ============================================

source ~/.tkdesk/ColorSets/ACTIVE_colorset

### basic background and foreground color:
set tkdesk(color,background) $a_BGcolor
set tkdesk(color,foreground) $b_FGcolor

### colors for selecting text in text and entry widgets:
set tkdesk(color,select_bg)  $n_SELtextBG
set tkdesk(color,select_fg)  $m_SELtextFG

### color for check boxes of activated check buttons:
set tkdesk(color,check_on)   $g_Xbox

### colors of the focus rectangle:
set tkdesk(color,focus)      $c_INfocus
set tkdesk(color,nofocus)    $d_OUTfocus

### background, foureground, and insert colors of entry and text widgets:
set tkdesk(color,entry_bg)   $j_BGentry
set tkdesk(color,entry_fg)   $k_FGentry
set tkdesk(color,text_bg)    $h_BGtext
set tkdesk(color,text_fg)    $i_FGtext
set tkdesk(color,insert)     $l_INSERTtext

### background and selection color of the file listboxes:
set tkdesk(color,filelb)     $e_BGlist
set tkdesk(color,listsel)    $f_SELECTlist

### background color of icon windows (to fake transparent icons):
set tkdesk(color,icon)       #185f6a

### color of the drag'n'drop cursor:
set tkdesk(color,drag)      $o_DDcursor 

### color of annotation entries in file popup menus:
set tkdesk(color,annotation) $p_NoteColor

### Note:
### Colors of directories, files etc. are now set in the file FileTags!


========================================================================

7. With your cursor in the System file window, press F5.


That should be enough. TkDesk should reload the System file, using the default ColorSwitch color set. (If you get "Red text on a Blue background," there is a "path problem." See "Troubleshooting ColorSwitch," below)




__________________________________________________________
Troubleshooting ColorSwitch

ColorSwitch depends on the following:

	- the "ColorSwitch" executable
	
		> identifies the path to the "ColorSets" directory, 
			where ColorSwitch expects to read and write
			the "ACTIVE_colorset" file. (line #28)
		  
		> identifies the path to the "homeDirectory,"
			where ColorSwitch expects to find
			the "ColorSwitch_Help" file. (line #29)
	
	- the modified "~/.tkdesk/System" file
		> sources the "ACTIVE_colorset" by its full path
			(refer to Install step #6, above)
		

If ColorSwitch launches, but everything is Red and Blue:
Make sure that the "ColorSwitch" executable file identifies the path to the "ColorSets" directory. The default is "~/.tkdesk/ColorSets/"

If you click the "?" but don't get the Help file:
Make sure that the "ColorSwitch" executable file identifies the path to the ColorSwitch "home" directory, where it expects to find the help file.
		
If TkDesk fails to start up, giving an error "Could not read file System....":
Make sure "~/.tkdesk/System" file sources the "ACTIVE_colorset" by its full path.
Make sure the file "ACTIVE_colorset" exists in that directory. 

__________________________________________________________	
Bugs
No "Undo" on changing colors. Doesn't revert politely if an invalid color is applied in the entry field. Rather kludgey. No Reset. Lacks support facilities (auto-install, error recovery, revising feature descriptions, built-in "Update TkDesk" function, etc.)

__________________________________________________________
Getting Away from ColorSwitch:

If you ever decide that you don't want to use ColorSwitch any more, no problem.

1. Replace the original TkDesk System file.

	If you backed up your original ~/.tkdesk/System file 
	(as suggested during install), the following command will do it:
	
	# mv ~/.tkdesk/System.BACKUP ~/.tkdesk/System
	
	If you neglected to backup the file, you can use the "master" file:
	From a TkDesk browser, choose Bookmarks (menu) -->TkDesk -->configs -->System
	
	You can use the System file "as is" (press F5) or cut and paste to replace
	the entire "Color Settings" section of your System file. (This literally
	reverses the install procedure.) Choose the latter if you've customized 
	other portions of your System file.
	
2. Delete the ~/.tkdesk/ColorSets/  directory.

3. Delete the ColorSwitch directory.

4. Restart TkDesk.


	
_________________________________________________
 
ColorSwitch is a TkDesk color configuration utility by Lionel Kirsher.
Copyright (C) 1999  Lionel Kirsher  (kirsherATyahoo.com)

The author of this program disclaims all responsibility.
 
 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.
 

