Sublets¶
Sublets are small Ruby scripts written in a small DSL that can provide things like system information for the panel. They are well included in the main loop of subtle and can be used in various ways. Further information about writing a sublet can be found here.
Installation¶
Easy¶
The easiest way to install a sublet is to let sur do all the dirty work, it's designed to be really easy and works in a rubygems like fashion and since r2138 bundled with subtle.
Generally sur is the subtle user repository for user contributed sublets, everyone can submit sublets via sur.
sur install clock sur uninstall clock sur notes clock
Hard¶
Ok, you asked for it: Point your browser to http://sur.subforge.org/ and download a sublet. Then you need to unpack the sublet - they are just tarballs. Once unpacked you will probably find three types of files:
- A sublet file (.rb) [
$XDG_DATA_HOME/subtle/sublets] - A specification file (.spec) [
$XDG_DATA_HOME/subtle/specifications] - Zero or more icons (.xbm) [
$XDG_DATA_HOME/subtle/icons]
The files need to be installed in the appropriate folders in $XDG_DATA_HOME/subtle and after a reload of either the configor the sublets you are done.
Configuration¶
Since r2222 there are three sublet properties than can be changed from the config of subtle without ever touching it:
- interval Update interval of the sublet
- foreground Default foreground color
- background Default background color
The color settings will override the default colors specified in the config.
Generally sublets can provide further properties, but it's up to the author. If there are any additional properties there are usually some notes about. (sur notes subletname)
Example:
Numbers: on /off1 sublet :clock do
2 interval 50
3 foreground "#eeeeee"
4 background "#0"
5 format_string "%H:%M"
6 end
