Torsmo

From blag.wiki.aktivix.org

Jump to: navigation, search

Contents

NOTICE

torsmo is unmaintained now, you should try Conky instead which is backwards compatable with torsmo.

http://conky.sourceforge.net/

BACKGROUND PREP

get the source from here http://torsmo.sourceforge.net/ All you need is X and gcc. nothing else is need for this to work.

INSTALLATION

I've read man hier a couple of times and it seems to suggest installing source-based packages in /usr/local/src. This is a recommendation that we follow in this case from hereon. as root

mv torso-foo.tar.gz /usr/local/src
tar -zxvvvf torso-foo.tar.gz
chown -vR jayeola.jayeola torso-foo

where jayeola is the name of the regular user. Replace that for your own.

switch back to reg user, or open a terminal for your reg user. In my case it's jayeola

cd /usr/local/src/torso-foo.tar.gz
./configure # it's a small package so it does not take long to compile
make check
#just to confirm that the make proces will work.
#there's not much need for this

switch back to root or use another terminal

make install

this takes about 5-10 mins for a PIII running on 256mb ram @ 750MHz

once this is done copy the sample file to your home dir

cp torsmorc.sample ~/.torsmorc

Note that this file is -hidden- in your home dir. It's good file to have as you can run/stop this app without being root. You can also change the variables as often as you like, also without the need for root. Not everyone will have access to /usr/local/ or should be root all of the time.

DOCUMENTATION

The man page is fairly light, there's not much there but you can get the options for changing the starting position, changing text, and update intervals. The best source of info is the ~/.torsmorc file. This code has working examples and can be used as template for your requirements.

MODDING TORSMO

This app is extremly hackable. we just change parameters in our newly created ~/.torsmorc file in our home dir. For safety sake make a copy of the new file

cp .torsmorc .torsmorc.orig

There's not much to this file. it's vey short. count the number of lines with

wc -l .torsmorc
203 .torsmorc

So that's just over 200 lines - about a screen and a half full of text.

For now run this so see the file with it's lines numbered;

nl .torsmorc |less

The numbers in the following lines refer to the line numbers of the ~/.torsmorc file.

19  mail_spool $MAIL 
21  update_interval 20.0

I use an interval of 20 seconds - i don't need to know the swap, cpu and temp every 5 seconds.

23  own_window no

I don't use nautilus so torsmo does not need it's own window. less resources

27  minimum_size 280 5

We set the size of the display area

lines 30-40 set the options for text and borders. You can also set the default colours here lines 58-150 show the variables that this program allows. There are quite a few; uptime, kernel version, ram usage... there's even an option for getting data for

distributed* projects like seto online :)

line 157 is where the fun starts. This should be a line similar to;

157  TEXT

from hereon, the parameters to be displayed by the sytem monitor are set. The syntax for these variables is -

&{color <soe colour>}&{name of acceptable parameter}&{name of acceptable parameter}

for example the top line of my torsmo has this

${color blue}$nodename - $sysname $kernel on $machine  (.)(.)  ${color green}${time %a %d %b}

ABOUT THE SOURCE CODE

for those who are interested

sloccount /usr/local/src/torsmo-0.18
SLOC    Directory       SLOC-by-Language (Sorted)
4240    torsmo-0.18     ansic=3882,sh=335,python=23
...
...
Totals grouped by language (dominant language first):
ansic:         3882 (91.56%)
sh:             335 (7.90%)
python:          23 (0.54%)

Total Physical Source Lines of Code (SLOC)                = 4,240

so we can see that of the 4,24 lines in the source code, torsmo is writen mainly in ANSI C, shell, and a tiny bit of python

WHAT DOES IT LOOK LIKE?

http://jayeola.org/images/tor.png http://jayeola.org/images/tor2.png http://jayeola.org/images/tor3.png http://jayeola.org/images/torsmo1.png

CREDITS

jayeola, the developers listed in the man page Hannu Saransaari and Lauri Hakkarainen

Personal tools