EyeBurn plugin for Take Command / TCC / TCC/LE

beta version 0.39.0     2024-04-02

Charles Dye

Purpose:

This plugin provides a number of color schemes for use in TCC, or Take Command v28 or later. A hotkey allows you to change color schemes with a single keypress. Customizable colors include the standard output colors, the command line input colors, the stderr colors, the ColorDir environment variable, and color definitions for the sixteen console colors.

This plugin requires:

Operating system:Windows Vista or later
TCCversion 14.0 or later (TCC/LE is supported)
Console environmenteither a normal standalone console window, or a tab window in Take Command v28 or later. Earlier versions of Take Command will not work, because they lack the interface to update the tab window’s palette.

EyeBurn will not work in other console replacements such as Console2, ConEmu, and Windows Terminal.

Installation:

To use this plugin, copy EyeBurn.dll and EyeBurn.ini to some known location on your hard drive. (If you are still using the 32-bit version of Take Command, take EyeBurn-x86.dll instead of EyeBurn.dll.) Load the .DLL file with a PLUGIN /L command, for example:

plugin /l c:\bin\tcmd\test\eyeburn.dll

If you copy these files to a subdirectory named PlugIns within your Take Command program directory, the plugin will be loaded automatically when TCC starts.

Plugin Features:

New hotkey: Alt-Z

New command: EYEBURN

Syntax Note:

The syntax definitions in the following text use these conventions for clarity:

BOLD CODEindicates text which must be typed exactly as shown.
CODEindicates optional text, which may be typed as shown or omitted.
Bold italicnames a required argument; a value must be supplied.
Regular italicnames an optional argument.
ellipsis…after an argument means that more than one may be given.

About Color Schemes:

Color schemes store and update a number of settings at once:

NameReq.TypeDescription
StdColorsOPTION settingthe default output colors
InputColorsOPTION settingtext entered at the command line
ErrorColorsOPTION settingtext sent to the standard error channel (stderr)
ListColorsOPTION settingused by the LIST command
ListStatBarColorsOPTION settingstatus bar in LIST
ListInverseColorsOPTION settinghighlighted text in LIST
SelectColorsOPTION settingused by the SELECT command
SelectStatBarColorsOPTION settingstatus bar in SELECT
SelectedColorsOPTION settingtext selected at the command line
ColorDirEnvironment variableused by DIR and others
Color definitions (16)Console settingsvalues of the sixteen console colors

Color schemes are stored in an .INI file, which is automatically read when the plugin is loaded. This file can be modified with any text editor. The values with a check mark ✓ in the second column are required; a color scheme which does not include a value for any of these is not considered a valid scheme.

You can reload a modified schemes file with EYEBURN /F:file.

When the plugin is loaded, it will look for a file named EyeBurn.ini in the same directory as the .DLL file. If EyeBurn.ini is not found in the .DLL’s directory, the plugin will look in the Take Command or TCC program directory. If EyeBurn.ini was found, the plugin will load color schemes from it. If the .INI file was not found in either location, four default color schemes built into the plugin .DLL will be used.

New Hotkey:

Alt-Z — Changes the color scheme.

The plugin will pick a different color scheme at random and apply it. If current console background is dark, the plugin will try to pick a light scheme; if the background is light, it will try to pick a dark scheme.

Alt-Z is the default hotkey, but you can use EYEBURN /K:key to change it.



New Command:

EYEBURN — Display and change plugin settings; list and apply color schemes.

Syntax:
EYEBURN /D /F:file /K:key /L /O:yn /Q /R /S /W:file::name scheme

/Drestore the default plugin settings
/F:fileread color schemes from an .INI file
/K:keychange the hotkeyAlt-Z
/Llist all supported hotkeys
/O:ynenable or disable the hotkey OSD displayYes
/Qquietly
/Rrestore saved settings from the registry
/Ssave the current settings to the registry
/W:file::namewrite the current color scheme to an .INI file
schemethe color scheme to apply (by name or number)

EYEBURN with no options displays the current settings, and lists the color schemes currently loaded in memory.


/K:key allows you to change the plugin’s hotkey. To see a list of all supported hotkeys, use /L. (The list can vary between versions of Take Command, because the plugin hotkey interface changed in version 24.) Note that some key combinations may not work for you — they might be intercepted by the console, by a keystroke alias, or by Take Command itself. If your hotkey doesn’t work, try changing it back to its default value, Alt-Z.

You can disable the hotkey with /K:NONE.


/F:file loads color schemes from an .INI file. Normally, this is done automatically when the plugin is loaded. You can use this option to test changes you’ve made to a color scheme without having to unload and reload the plugin.


/W:file::name writes the current color scheme to an .INI file. file is the filename, and name is the name of the scheme to save — the section name within the .INI file.


/O enables or disables the hotkey OSD display. If it’s enabled, pressing the hotkey will display the new scheme name at the upper right of the main monitor. The default is Yes. (Only the first character is significant.)


/D restores the original plugin default settings (shown in the third column of the table above). Plugin settings include the hotkey assignment and whether the hotkey OSD is enabled.

/R restores the settings saved to the registry, if any. If you specify both /D and /R, EyeBurn will try to read settings from the registry first, and then restore the original plugin defaults only if restoring from the registry failed.

/S saves the current settings to the registry. They will be loaded automatically the next time you load this plugin.



.INI File Format:

Color schemes are saved in an .INI file. The file is structured as a regular Windows .INI file, using the UTF-8 text encoding to prevent Unicode characters from being mangled.

Each color scheme is stored in a separate section; the name of the color scheme is the section name. OPTION settings and the ColorDir environment variable are stored in the obvious way. Palette color definitions are named “Color 0” through “Color 15” and the values are hexadecimal, RRGGBB, with a leading # sign. (You can also use W3C color names if you prefer.)

Here’s an example:

[Crème Brûlée]
StdColors=Black on Bright White
InputColors=Yellow on Bright White
ErrorColors=Red on Bright White
ListColors=Black on Bright White
ListStatBarColors=Bright White on Yellow
ListInverseColors=Bright White on Yellow
SelectColors==Black on Bright White
SelectStatBarColors=Bright White on Yellow
SelectedColors=Bright White on Black
ColorDir=dirs:244;com exe:242;bat btm cmd:241;txt doc html:243;
Color 0=#000000
Color 1=#0000a0
Color 2=#009000
Color 3=#0090a0
Color 4=#900000
Color 5=#9000a0
Color 6=#806000
Color 7=#c0c0c0
Color 8=#606060
Color 9=#4040ff
Color 10=#40ff40
Color 11=#40ffff
Color 12=#ff4040
Color 13=#ff40ff
Color 14=#ffff40
Color 15=#fff8f0

A color scheme must contain, at the very least, legal values for StdColors, InputColors, ErrorColors, and all sixteen palette definitions. Any section which lacks any of these will be ignored.

Startup Message:

This plugin displays an informational line when it initializes. The message will be suppressed in transient or pipe shells. You can disable it for all shells by defining an environment variable named NOLOADMSG, for example:

set /e /u noloadmsg=1

Status and Licensing:

Consider this beta software. It may well have issues. Try it at your own risk. If you find a problem, you can report it in the JP Software support forum.

EyeBurn is currently licensed only for testing purposes. I may make binaries and source code available under some free license once I consider it ready for use.

Download:

You can download the current version of the plugin from http://charlesdye.net/dl/eyeburn.zip.