Theme.rc
The following is an example of an OTS2 theme.rc configuration file to be loaded at LiteStep's execution. OTS2 is the second generation of the Open Theme Standard, which is to be followed for themes to be compatible with the LiteStep structure.[7] The theme.rc file is the entry point for all LiteStep themes.
;Lines preceded by a semicolon are not parsed by the LiteStep core.
;This indicates to the LiteStep core that the theme is OTS2 compliant.
OTSMajorVersion 2
OTSMinorVersion 0
ThemeName "Name of Theme Here"
ThemeAuthor "Name of Author Here"
; This defines a variable named "ConfigDir" to shorten defining where configuration files are located, in the next section.
ConfigDir "$ThemeDir$Config\"
;The "Include" command tells the LiteStep core to parse the defined file. Configuration files are defined at the user's disrection for organization purposes.
Include "$ConfigDir$themevars.rc"
Include "$ConfigDir$xlabel.rc"
Include "$ConfigDir$lsxcommand.rc"
Include "$ConfigDir$xpopup.rc"
Include "$ConfigDir$xtaskbar.rc"
Include "$ConfigDir$xtray.rc"
Include "$ConfigDir$vwm.rc"
;*NetLoadModule module-ver# tells the NetLoadModule2.dll to load the following modules for use with the loaded theme.
*NetLoadModule jdesk-0.75
*NetLoadModule xpopup-2.1
*NetLoadModule lsxcommand-2.0.2
*NetLoadModule rabidvwm-1.2.2
*NetLoadModule xtray-2.2.2
*NetLoadModule xtaskbar-2.3.4
*NetLoadModule xlabel-4.3
Explanation
The LiteStep interface is composed of modules, most having the extension .dll. They are loaded by themes through a text configuration file named theme.rc. To load different modules you would write a line like this, to invoke LiteStep's NetLoadModule.dll:
*NetLoadModule ModuleName-version#
NetLoadModule.dll is itself a module that is loaded in a default LiteStep setup. The command *NetLoadModule tells NetLoadModule.dll to load a module for use in the current theme.
LiteStep and its themes rely on variables, with many already hardcoded into the core. Variables are surrounded with $...$. $LiteStepDir$, for example, is the directory that litestep.exe resides in.
Other variables can be manually set by writing a line in any configuration file like this:
Firefox "C:\progra~1\Mozill~1\firefox.exe"
You could then use the variable $Firefox$ instead of the full path to the executable.
Module configurations can span over different files for the sake of organization. The command "include," seen below, tells LiteStep to load the specified file. The variable $ThemeDir$ is the directory of the theme being currently used. Put together with "Config\someconfig.rc" will result in the settings of file someconfig.rc being loaded from \Theme\Config\someconfig.rc.
include "$ThemeDir$Config\someconfig.rc"
Modules are what make LiteStep look and behave the way you want it to. There are graphical modules that are used to build GUI elements and non-graphical modules used to create hotkeys, watch window classes for scripted events, and create LiteStep-specific commands called !bang commands. !bang commands are a way to execute event-driven functions within a given theme. These commands can reference files, folders, namespaces, executables, or elements of the theme itself. Many !bang commands are hardcoded into the LiteStep core, and others may be provided through user scripts or through the currently loaded modules. Bangs are the primary way you control the modules. !bangs can be triggered through a hotkey, popup menu, shortcut, or through module-specific events.
Some of the most popular modules include:
- lsxcommand.dll: This module creates a commandline where you can enter bang commands, filepath commands i.e. notepad.exe or C:\, and urls.
- v_bang-lite.dll: This module creates bangs to control Winamp. The bangs can then be used in User Interface elements such as shortcuts, or hotkeys, etc.
- hotkey.dll: This type of module lets you create custom hotkeys, which can be used to execute a hardcoded bang command, or a module specific bang command.
- xlabel.dll: Theme developers use xlabel for creating box-like windows on the desktop. These "boxes" can be used for informational texts (ex: cpu usage, memory usage, uptime, song playing, etc.) or images, or a combination of both. xlabel can also be used to create buttons for running !bang commands, scripts, or opening system programs. Basically, anything you would like to display and interact with can be made using xlabel.