Litestep basics
Litestep Basics
Table of Content
Table of content:
Installation
Litestep has a nice installer called LOSI. You can find it at http://tlundberg.com/LOSI/. The installation should be quite straight-forward, LOSI comes with reasonable default settings so you can usually just stick with them. After the installation you have to log out or reboot winodws.
Once you are logged in Windows again you see the default LOSI theme. It is a pretty simple theme with a taskbar, system tray and desktop icons. If you right-click the desktop, you will see the popup, which is your primary way to launch applications and choose Litestep themes. You will use the popup alot, so i will show you how to customize it and other basic Litestep features in the next chapters.
Configuration
There are three files the contain most of the basic Litestep settings. You were able to set thelocation of these files during the installation. If you didn't change the default settings, these files are located in C:/Litestep/profiles/%USERNAME%/personal/. Other possible places are C:/Litestep/personal and C:/Documents and Settings/%USERNAME%/Applicationdata/Litestep/personal
First, we will take a look into hotkey.rc. Double-click the file, and when the "Open with" dialog comes up select "Notepad" and click ok. As you can see, the file says "edit according to preference", so lets do that now!
This file sets up custom Hotkeys you can use to work faster. It is also a great and easy way to explore some of the basic concepts of Litestep. Just by opening this file, you already discovered Litestep's first principle: Everything is configured by plain text files!
When you take a closer look into the file, you might notice a few things:
- Some lines start with a ";" followed by a comment. Litestep treats everything after a ";" untill the end of the line as a comment and ignores it.
- There are several words starting with a "!", like "!Run". These are called "bangs". A bang is basically a way to tell Litestep to do something. For example, "!Run" tells Litestep to open the windows "run" dialoge. Bangs are very important and one of the main reason why Litestep is so powerfull. Make sure you take a look at the list of predefined bangs some time.
- Some words are enclosed in "$", for example "$FileManager$". Litestep tries to evaluate anything between two "$". Text enclosed in $ becomes a variable. Therefore in our example "$FileManager$" tells Litestep to look for a variable named "Filemanager". Also, Litestep tries to compute any mathematical expression between two "$". For example, "$1+2$" simply means "3" to Litestep. As you can see, the "$" are very powerfull too.
- Last there are lines that start with a "*", like all the "*Hotkey" lines. These are called definitions. They tell Litestep to do something once during startup. "*Hotkey" for example tells Litestep to register a new hotkey.
Creating a Hotkey
Now that we know the basics of Litestep, lets do something we can actually use. One of the first hotkeys i set up was a combination to shutdown windows fast.
To set up a new hotkey, open up "hotkey.rc" in notepad, if you have not done that yet. On a new line, write the following:
*Hotkey WIN Q !shutdown
"*Hotkey" tells Litestep that we want to create a new hotkey. Next, we tell Litestep what modifier key we want to use. "WIN" stands for the windows key, other possible keys are "CTRL","SHIFT" and "ALT". To use a combination of two of these, write a "+" between them, CTRL+ALT for example. Notice that Litestep is not case sensitive, so it does not matter wheter you type "WIN", "win" or "WiN". Next is the actual key, Q in my example. The last word specifies the command to run on the hotkey, which is !shotdown here. As you already know, !shutdown is a bang, and this one tells Litestep to show the Windows shutdown dialoge. The hotkey is configured, so lets save the file. But as Litestep only loads files on startup, we need to restart Litestep before it will notice any changes to the file. Luckily, Litestep comes with a predefined hotkey for that, "CTRL+ALT R". This will restart ("recycle") Litestep, so you can use your new hotkey.
Hotkeys can be used to run any bang, path or executeable. For example i have a hotkey to launch my favorite game, for my email client and to open my downloads folder. You can also run serveral applications at once using !execute. You can get information about these bangs in the list of predefined bangs. If you find yourself doing the same thing over and over again, why not set a hotkey for it?
Setting Evars
Evars is short for "enviroment variable", meaning variables that tell something about your computer and your favorite programs. You can set an evar in two diffrent ways: One way is to use a program named "EvarConfig.exe", sitting in C:/Litestep/utilities/. When you start the program you see most of the evars have already been set to default values. Most of the default setting will probaly fit your preverences, but if your favorite application is not listed yet, you can change that here. For example, if you want to use Firefox instead of the Internet Explorer as the default browser, look for the field that says "Browser" and set it to your favorite browser.
But as we know, every setting in Litestep can be changed with a text editor as well. Browse to your /personal/ directory and open "evars.rc". If you want to change your default browser to FireFox here, just look out for the line that starts with "Browser" and edit the path.
While the file is open, take a close look at the first line, it starts with "Filemanager". We read this in the hotkey.rc file before, when i was explaining the meaning of the "$". As i said back then, "$Filemanager$" means that Litestep should look out for a variable named "Filemanager". It looks like we have found that variable inside the evars.rc!
- Any line not starting with "*" or ";" creates a new variable. The following line sets the variable "FileManager" to the value "C:\WINDOWS\explorer.exe". When Litestep encounters $FileManager$ it will replace the variable by its value.
FileManager "C:\WINDOWS\explorer.exe" - Variables can be used in any file Litestep loads, not only the file they are defined in.
- It doesn't make any difference when a variable is defined, as long it is defined at all. For example,
is equal to*Hotkey WIN H !alert "Hello there, $who$!" who "Litestep"who "Litestep" *Hotkey WIN H !alert "Hello there, $who$!" - When Litestep is starting up, it will generate a error message for each undefined variable.
- Before a mathematical expression inside two $ is evaluated, all variables are replaced by their value:
uno "1" due 2 *Hotkey WIN H !alert "sei means $Uno+due+3$!" - Litestep reads the first word after a variable as it's value. That means that you have to enclose any value that contains spaces in quotes.
greetings Hello my friend! ; No quotes! $greetings$ is only "Hello"! greetings "Hello my friend!" ; correct
Configuring the Popup
The popup is the main feature of Litestep, and you will use it alot. Therefore, you can save alot time by editing it to give you easy access to your favorite programs.
You probably already guessed what file we will have a look at now. Open up the popup.rc in your personal folder and let's do some customizing!
First thing you will notice is that this file is rather big and seems to be pretty complex, and the popup2 documentation doesn't help very much either.
maybe we can find any similarities between this file and your popup window. Right-click your desktop to open the popup and take a look. The first two items read "file manager" and "text manager", and clicking on them starts the respective programs. Okay, these two are pretty usefull, but i use my browser alot too. I will save time by adding the browser right there. But how?
Read the first few lines of your popup.rc:
*Popup !New !Popup ;DO NOT DELETE THIS LINE
*Popup "file manager" "$FileManager$"
*Popup "text editor" "$TxtEditor$"
Now, that looks just like our popup. The first line tells Litestep that a popup configuration follows. The next line is already the first line of the popup. It tells Litestep what text to display in the popup ("file manager") and what to do if the line is clicked ("$Filemanager$", which is, as we know already, just a variable and short for the path to the explorer). So all we need to do to add a "browser" entry to the popup is creating a new line right below the "text editor":
*Popup !New !Popup ;DO NOT DELETE THIS LINE
*Popup "file manager" "$FileManager$"
*Popup "text editor" "$TxtEditor$"
*Popup "browser" "$Browser$"
Remeber, these lines are *Definitions, no $variables$, so the order does matter! A quick recycle (CTRL+ALT R) and you can see the results of your changes.
So far, so simple, but there is alot more a popup can do. If you move your mouse above the "Litestep" entry, it pops up in a folder-like strcuture and you can select from more options, like "change theme" or "recycle". Lets do something like this too. What about creating a folder that provides easy access to our favorite games? Lets take a look at the next few lines in popup.rc:
*Popup "Litestep" Folder
*Popup "Litestep folder" !execute ["$FileManager$" /e,"$LiteStepDir$"]
*Popup "themes folder" !execute ["$FileManager$" /e,"$ThemesDir$"]
*Popup "about" !About
[... more lines ..]
*Popup "module docs" !PopupFolder:"$ModulesDir$docs\|$LitestepDir$NLM\*.html"
*Popup ~Folder
The first line tells Litestep to create a new "Folder" named "Litestep". The next line is just like the one we already know: Create a single entry, called "Litestep folder", and run a command when you click on it. The only line that we haven't seen before is the last: "*Popup ~Folder" simply means that the folder we started on the first line ends here.
Okay, thats all we need to know, lets create our games folder:
*Popup "My Games" Folder
*Popup "Solitaire" "C:/WINDOWS/system32/solitaire.exe"
*Popup "Hearts" "C:/WINDOWS/system32/hearts.exe"*Popup ~Folder
Another fast way to create a folder in your popup works by using the !PopupFolder or !DynamicFolder bang. Both commands are used with the path to a folder and display the content of this folder in the popup. I created a folder named shortcuts, and put links to all my favorite programms into it. Then i added
<code>*Popup "shortcuts" !DynamicFolder:"D:\shortcuts"</code>
to my popup and gained a fast and easy way to access all my favorite programs in one place.
As you can see, with little work your popup will look just like you want it to and save you alot time.
Installing Themes
Usually a theme comes in either .lsz oder .zip format, but in fact a .lsz file is just a renamed .zip file. However, it's contents need to be extracted to "C:/Litestep/profiles/your name/themes/". If you downloaded a .lsz file, you can just double-click it and the Litestep theme installer will take care of the extraction. If you have a zip file, open it and extract it into a subfolder of /themes/, or simply rename it to .lsz.
To select a different theme, open your popup and select the desired theme from the list (Litestep->change themes). If the theme doesn't show up, click Litestep->change themes->refresh list. Now you will be able to choose it from the list of themes, unless there is something wrong with the theme.
Another way to select a different theme is to edit /themes/themeselect.rc. Just edit the ThemeDir variable so it points to the new theme's folder. For example, change it to "$ThemesDir$mytheme\" to select the theme named "mytheme". This can often come handy if you installed a broken theme and lost access to the popup.
Many themes can be configured by left-clicking on the desktop while holding down the Shift key. You can try this with Austerity, but it also works in many other themes.
Of course, themes are plain text files too, just like everything else in Litestep. If you want to take a look at the files that creates your theme, just open your theme's folder from your popup (Litestep->Theme Folder). "theme.rc" is a good place to start, but it takes more than just a few lines to create a complete theme.
Utilities
Litestep comes with a few usefull utilities. You can access them from C:/Litestep/utilities/. Namely these utilities are:
- AddUser.exe - Use this utility to setup Litestep as the default shell on a new windows user account.
- EvarConfig.exe - You can set all evars, like $Browser$ with this utility.
- LSThemeInstaller.exe - This tool installs themes from .lsz files. You can disable the "Revert to the default theme?" warning here.
- SetShell.exe - You can set your shell with this tool. Either click on explorer if you had enough of Litestep, or browse to the Litestep.exe and click Custom. You might need this tool once in a while, because sometimes explorer.exe will set itself as the default shell again for unknown reason.
- UpdateBuild.exe - There is no new build you could update Litestep with, so this utility is pretty useless for the moment.
Uninstalling
If you installed Litestep using the Installer, uninstalling is no problem either. You can either use the Uninstall entry in your start menue or the windows software dialog and litestep is gone with all it's glory. After a reboot, you should have the explorer back.
If you didn't use the installer, you just have the undo any changes you had to do when you installed Litestep. The most important one is to set your shell back to explorer.exe. If you remember how, just take a look at the wiki.litestep.com page. Just follow the instructions, but instead of setting litestep.exe as the shell, set it back to explorer.exe.
Notes
I hope i was able to cover everything you need to know about Litestep and how it basically works. If there are any general questions left, feel free to write me or visit the #Litestep channel on irc.freenode.net.
For more general information about Litestep visit the Litestep Wiki and the Litestep Documentation
Have fun with Litestep.
THC4k
jugg wrote on December 12, 2008 at 19:23:
The link to the latest LiteStep Update is out of date. To download the latest update go to lsdev.org and get the "Core Build" download.