Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

torsmo Tips & Tricks

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
223 posts
  • Page 4 of 9
    • Jump to page:
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • …
  • 9
  • Next
Author
Message
reksav
Apprentice
Apprentice
Posts: 165
Joined: Wed Mar 09, 2005 4:49 am
Location: rochester, ny

  • Quote

Post by reksav » Wed Mar 09, 2005 4:53 am

this is going to be an easy fix question for you guys... im VERY new to linux (a few days) and found torsmo pretty interesting so ive been playing with it... a simple feature ive been trying to put together takes the fs_free function and sums it with 2 or 3 other fs_free function results... basically giving a total of all the free space i have on the drives torsmo checks... if someone could help me out on this thatd be great... thanks
Top
thoughts
Apprentice
Apprentice
Posts: 153
Joined: Thu Apr 15, 2004 4:28 am
Location: Pennsylvania
Contact:
Contact thoughts
Website

  • Quote

Post by thoughts » Wed Mar 09, 2005 7:17 am

Is there a way to make torsmo print its output on top of a Gnome panel (or to "embed" torsmo into a Gnome panel)? I use the System Monitor that's included with Gnome, and the only thing I really want that it doesn't show is network tx/rx values. Torsmo does this nicely.

Thanks,
Anthony DiSante
http://nodivisions.com/
Top
orphansandoligarchs
n00b
n00b
Posts: 7
Joined: Wed Sep 22, 2004 2:01 pm
Location: Northants, England
Contact:
Contact orphansandoligarchs
Website

  • Quote

Post by orphansandoligarchs » Wed Mar 09, 2005 4:53 pm

reksav wrote:this is going to be an easy fix question for you guys... im VERY new to linux (a few days) and found torsmo pretty interesting so ive been playing with it... a simple feature ive been trying to put together takes the fs_free function and sums it with 2 or 3 other fs_free function results... basically giving a total of all the free space i have on the drives torsmo checks... if someone could help me out on this thatd be great... thanks
I'm very new to linux too, and am just starting to learn to hack my way around a bit so I thought this would be a nice chance for me to learn a bit more bash and a little perl. There's possibly a really easy way to do this, but anyway, here's my quite nasty solution. Apologies for badness of code etc etc.

Code: Select all

#!/bin/bash
index=0
for arg in "$@"
do
	if [ "$index" != 0 ]
	then
		if [ "$1" = -f ]
		then
			export fs${index}=`df -k | grep $arg |awk '{print $4}'`
		fi
		if [ "$1" = -u ]
		then
			export fs${index}=`df -k | grep $arg |awk '{print $3}'`
		fi
		export fs${index}t=`df -k | grep $arg |awk '{print $2}'`
	fi
	let "index+=1"
done
export index
perl -e '
	$fs=0;
	for (my $i=1; $i<$ENV{index}; $i++)
	{	
		$fs+=$ENV{fs.$i};
		$fstotal+=$ENV{fs.$i.t};
	}
	$fs=$fs/1024/1024;
	$fstotal=$fstotal/1024/1024;
	printf ("%.2fG/%.2fG\n",$fs, $fstotal);
'
The usage is:

Code: Select all

./filename.sh (-f | -u) (filesystems)
-f gives free space, -u gives used space
So in the torsmorc I'm using

Code: Select all

${execi 1.0 /path/to/fs.sh -f hda3 hdb1}
And now I feel a (slightly) better coder and an equally slightly better person. Hope that does the trick :)
Top
Maximus2000
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 127
Joined: Thu Oct 07, 2004 7:50 pm
Location: USA

  • Quote

Post by Maximus2000 » Wed Mar 09, 2005 9:48 pm

Ok I love this setup and am using torsmo for the first time. It is great however, I have it set to refresh every 3 seconds. When it does it blinks. Is there anyway to fix this? I am runing A Pentium 4 3.06 w/ 1Gb mem. Kernel-2.6.10-ck5 with reiser4 support. DE is Gnome 2.8.3 with openbox.
Thanks
Maximus
Top
reksav
Apprentice
Apprentice
Posts: 165
Joined: Wed Mar 09, 2005 4:49 am
Location: rochester, ny

  • Quote

Post by reksav » Thu Mar 10, 2005 4:03 pm

thanks for that orphan... it works but gives errors in the terminal,

Code: Select all

/home/reksav/applications/torsmo-0.18/sumfs.sh: line 10: export: `257796': not a valid identifier
/home/reksav/applications/torsmo-0.18/sumfs.sh: line 10: export: `82658': not a valid identifier
/home/reksav/applications/torsmo-0.18/sumfs.sh: line 10: export: `11720964': not a valid identifier
/home/reksav/applications/torsmo-0.18/sumfs.sh: line 16: export: `257816': not a valid identifier
/home/reksav/applications/torsmo-0.18/sumfs.sh: line 16: export: `101105': not a valid identifier
/home/reksav/applications/torsmo-0.18/sumfs.sh: line 16: export: `61440560': not a valid identifier

... and max try enabling the double buffer option, sometimes it works, sometimes it doesnt.
Top
orphansandoligarchs
n00b
n00b
Posts: 7
Joined: Wed Sep 22, 2004 2:01 pm
Location: Northants, England
Contact:
Contact orphansandoligarchs
Website

  • Quote

Post by orphansandoligarchs » Thu Mar 10, 2005 5:35 pm

Hum, not really sure about what's going on there. Maybe try this:

Code: Select all

Line 9 - export fs${index}="`df -k | grep $arg |awk '{print $4}'`"
Line 13 - export "fs${index}="`df -k | grep $arg |awk '{print $3}'`"
Line 15 - export "fs${index}t="`df -k | grep $arg |awk '{print $2}'`"
Just replace those in, all it's done is stuck a quote around the export command. If it's still not working I'll dig a bit more, cause everything seems about ok here. :roll: I knew it wouldn't work somewhere!
Top
reksav
Apprentice
Apprentice
Posts: 165
Joined: Wed Mar 09, 2005 4:49 am
Location: rochester, ny

  • Quote

Post by reksav » Thu Mar 10, 2005 9:26 pm

that did it, works perfectly :) thanks a ton
Top
ShyGuy91284
Tux's lil' helper
Tux's lil' helper
Posts: 114
Joined: Sun Mar 28, 2004 3:36 am

  • Quote

Post by ShyGuy91284 » Mon Mar 14, 2005 3:38 am

Is there any way to get torsmo to recieve notification of something happening? It checking things seems to be very tedious, and I'd like for Evolution to just be able to tell it I have new mail (As I see it now, I can maybe modify a file when I have new mail, and have torismo watching it), and for some other things to be slightly cleaner in how they run.
Top
latz-twn
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 95
Joined: Sat Nov 08, 2003 4:49 am
Location: Luxembourg
Contact:
Contact latz-twn
Website

  • Quote

Post by latz-twn » Mon Mar 14, 2005 1:36 pm

Hey, I wrote a little script! Which might be useful for some guys that believe in bleeding edge, and don't want to check for updates on sites and stuff! Here is a little screenshot of my Torsmo atm, with the stuff I am about to show you surrounded with red! I am not going to explain every single bit, but only the bit under Wanted updates.

First of all you have to create an entry in your crontab which checks for all Upgradeonly packages that are available in portage, and put's that list into a file. Make sure you update your portage regularly. Anyway here just an example of the entry

crontab entry

Code: Select all

crontab -e

0 6 * * * emerge -pU world > /tmp/emergeUpgradeList
that's it for cron we are all set there, now we need a little script which can be executed by a normal user, the user that runs torsmo of course. This script will get a list of all the updates that are important to you. In this script you can define which packages you are most interested in, to get updates! So let's get it on...

showUpgrades.sh

Code: Select all

#!/bin/bash
#Show Packages that need updating and you are interested in
# To add new packages just continue in the order '|foo|bar|zip|it|dot|com'
# always leave the end free of '|'
file=/tmp/emergeUpgradeList
showNr=15
intPackages="licq|amarok|fluxbox|firefox|xchat"


head -n $showNr $file | grep -e "\[ebuild *[U]* *\]" | egrep "($intPackages)" | awk '{print $4}'
and that's it already, when you run this script it shows you the 15 first updates of packages you are interested in! This list is a bit short though, my personal list is much longer! That's why I did this thing with the limit! Anyways now let's set up torsmo to display this, that's pretty easy to do, just executing with interval the script and that's it done thanks to the power of portage!

.torsmorc

Code: Select all

${execi 1800 whereTO/showUpgrades.sh}

I hope this is usefule to anybody! Cyas Nice thread btw! This was needed!
LinuxCounter: #353618
Top
kamisama
n00b
n00b
Posts: 41
Joined: Tue Apr 27, 2004 6:59 am

hey guys

  • Quote

Post by kamisama » Mon Mar 14, 2005 3:13 pm

I posted a topic asking how to get seti progress to work in 0.18-r1 torsmo before I saw this topic, the variables given in the sample config don't seem to work.

Has anyone had success with this? I'd love to have the progress in torsmo rather than having to run ksetispy or the like just to see my progress. Thanks in advance.
Top
ilythiiri
n00b
n00b
Posts: 22
Joined: Mon Jan 17, 2005 10:56 pm
Location: Temuco, Chile

  • Quote

Post by ilythiiri » Mon Mar 14, 2005 3:26 pm

how do i change the i2c location that .torsmorc reads by default ???
torsmo: can't open '/sys/bus/i2c/devices/0-0050/temp1_input': No such file or directory
but i want it to read in this location "/sys/class/i2c-adapter/i2c-1/device/1-0290/temp2_input"
a sym link wont work i've tryed that.
Thx in advance.
/*EDIT*/
if i put thi in .torsmorc
${exec cat /sys/class/i2c-adapter/i2c-1/device/1-0290/temp2_input}
the output is 34500 and i want it to be this way 34.5 :D
Top
marcus
n00b
n00b
Posts: 37
Joined: Thu Jun 20, 2002 12:52 pm
Location: Skjern, Denmark
Contact:
Contact marcus
Website

  • Quote

Post by marcus » Sat Mar 19, 2005 2:40 am

I too liked the powerstatus script. However, I have changed to fit my needs (my laptop has two batteries):

Code: Select all

# when both batteries are present
if grep -q yes /proc/acpi/battery/BAT2/state ; then 

	# get battery info
	bat1cap=`cat /proc/acpi/battery/BAT1/info | grep last`
	bat1rem=`cat /proc/acpi/battery/BAT1/state | grep remaining`
	bat2cap=`cat /proc/acpi/battery/BAT2/info | grep last`
	bat2rem=`cat /proc/acpi/battery/BAT2/state | grep remaining`
	
		# strip text
		bat1cap=${bat1cap%' mWh'}
		bat1rem=${bat1rem%' mWh'}
		bat1cap=${bat1cap#'last full capacity: '}
		bat1rem=${bat1rem#'remaining capacity: '}

		bat2cap=${bat2cap%' mWh'}
		bat2rem=${bat2rem%' mWh'}
		bat2cap=${bat2cap#'last full capacity: '}
		bat2rem=${bat2rem#'remaining capacity: '}

		# make totals
		batscap=`echo "($bat1cap+$bat2cap)" | bc`
		batsrem=`echo "($bat1rem+$bat2rem)" | bc`

		# make percentage
		batsperc=`echo "scale=2; ($batsrem/$batscap)*100" | bc`
		batsperc=${batsperc%'.00'}

# when just one battery is present
else

	# get battery info
	bat1cap=`cat /proc/acpi/battery/BAT1/info | grep last`
	bat1rem=`cat /proc/acpi/battery/BAT1/state | grep remaining`

		# strip text
		bat1cap=${bat1cap%' mWh'}
		bat1rem=${bat1rem%' mWh'}
		bat1cap=${bat1cap#'last full capacity: '}
		bat1rem=${bat1rem#'remaining capacity: '}

		# make percentage
		bat1perc=`echo "scale=2; ($bat1rem/$bat1cap)*100" | bc`
		bat1perc=${bat1perc%'.00'}

fi

# when plugged in
if grep -q on-line /proc/acpi/ac_adapter/ADP1/state ; then 
	if grep -q yes /proc/acpi/battery/BAT2/state ; then 
		echo "plugged-in | Bat: $batsperc%"
	else
		echo "plugged-in | Bat: $bat1perc%"
	fi

# when running on batteries
else
	if grep -q yes /proc/acpi/battery/BAT2/state ; then 
		echo "Bat: $batsperc%"
	else
		echo "Bat: $bat1perc%"
	fi
fi
I see that some of you have torsmo-info showing in different places on the desktop. How do you do that?

Marcus
Top
Arainach
l33t
l33t
User avatar
Posts: 609
Joined: Thu Jul 08, 2004 2:30 am

  • Quote

Post by Arainach » Sat Mar 19, 2005 2:57 am

By running multiple copies of torsmo.
Gentoo: Stage3 w/ NPTL & udev, gcc 3.4.4 full rebuild
Kernel: 2.6.15-gentoo-r1 w/ 1G-Lowmem Patch
System: Athlon XP 2.2Ghz/1GB Corsair Value/160GB, 250GB WD IDE/128MB GeForce 6800/Sony 17" Trinitron G200 @ 1280x1024x75Hz
Top
marcus
n00b
n00b
Posts: 37
Joined: Thu Jun 20, 2002 12:52 pm
Location: Skjern, Denmark
Contact:
Contact marcus
Website

  • Quote

Post by marcus » Sat Mar 19, 2005 3:15 am

With multiple .torsmorc files?
Top
Arainach
l33t
l33t
User avatar
Posts: 609
Joined: Thu Jul 08, 2004 2:30 am

  • Quote

Post by Arainach » Sat Mar 19, 2005 5:32 am

By running

Code: Select all

torsmo -c configfile
Gentoo: Stage3 w/ NPTL & udev, gcc 3.4.4 full rebuild
Kernel: 2.6.15-gentoo-r1 w/ 1G-Lowmem Patch
System: Athlon XP 2.2Ghz/1GB Corsair Value/160GB, 250GB WD IDE/128MB GeForce 6800/Sony 17" Trinitron G200 @ 1280x1024x75Hz
Top
VoiDeR
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 122
Joined: Thu Dec 11, 2003 7:42 pm

  • Quote

Post by VoiDeR » Sat Mar 19, 2005 5:50 am

When i run torsmo A it runs fine i used the -b option so it doesnt flicker. When i run torsmo B it disapears then when its time for it to refresh it reapears and A disapears and vice versa. Is there any way to stop this. Both are using the -b option.

Thanks
VoiDeR
Top
nucular
n00b
n00b
Posts: 11
Joined: Wed Feb 23, 2005 4:14 pm
Location: Finland

  • Quote

Post by nucular » Sat Mar 19, 2005 8:51 am

ilythiiri wrote:how do i change the i2c location that .torsmorc reads by default ???
torsmo: can't open '/sys/bus/i2c/devices/0-0050/temp1_input': No such file or directory
but i want it to read in this location "/sys/class/i2c-adapter/i2c-1/device/1-0290/temp2_input"
a sym link wont work i've tryed that.
Thx in advance.
/*EDIT*/
if i put thi in .torsmorc
${exec cat /sys/class/i2c-adapter/i2c-1/device/1-0290/temp2_input}
the output is 34500 and i want it to be this way 34.5 :D
I have this in my .torsmorc

Code: Select all

 ${color grey90}CPU temp: ${color}${execi 0.5 echo "scale=1; `cat /sys/bus/i2c/devices/0-0290/temp2_input`/1000" | bc}°C ${color grey90}MB temp: ${color}${execi 0.5 echo "scale=1; `cat /sys/bus/i2c/devices/0-0290/temp1_input`/1000" | bc}°C
Top
CitizenX
Apprentice
Apprentice
User avatar
Posts: 158
Joined: Sat Sep 11, 2004 2:44 am
Location: Fresno, CA

  • Quote

Post by CitizenX » Sat Mar 19, 2005 10:10 am

voider, Im getting the same bug....as of right now, you have to either live with the flicker of single buffer mode, or have each torsmo have its own window. I do this to have all my torsmos up and visible without flicker. The drawbacks are that torsmo isnt actually on the root window but above it in a borderless window of its own.

in .torsmorc:

Code: Select all

double_buffer no
or

Code: Select all

own_window yes
Top
ahlen
n00b
n00b
User avatar
Posts: 17
Joined: Wed May 12, 2004 3:49 pm
Location: Linköping, Sweden

  • Quote

Post by ahlen » Tue Mar 29, 2005 10:25 pm

I'm having a small problem. I want to set the default_color, default_shade_color and default_outline_color to #292820 but it's not working. When I try to start torsmo it only says config file error. Is it even posssible to set it to hexadecimal values? If that's not possible, how do I add the color to the rgb.txt then?

/Ahlen
Top
Sadako
Advocate
Advocate
User avatar
Posts: 3792
Joined: Thu Aug 05, 2004 5:50 pm
Location: sleeping in the bathtub
Contact:
Contact Sadako
Website

  • Quote

Post by Sadako » Wed Mar 30, 2005 1:55 am

Could somebody maybe provide a little "idiots guide" for installing the XMMS::InfoPipe module, as I can't get it to work no matter what I try, and I haven't the first idea about perl.

When I try to use the crishchun's xmms.pl script, I get the following error;

Code: Select all

Can't locate XMMS/InfoPipe.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.5/i686-linux /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i686-linux /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.5/i686-linux /usr/lib/perl5/5.8.5 /usr/local/lib/site_perl .) at /home/mark/xmmsinfopl/xmms.pl line 6.
BEGIN failed--compilation aborted at /home/mark/xmmsinfopl/xmms.pl line 6.
I have the xmms (and bmp) plugin installed and working fine, and I've copied the XMMS::InfoPipe.pm into numerous directories in /usr/lib/perl5.

Also, whenever I try to build it from source using the instructions found at http://search.cpan.org/~tsibley/XMMS-InfoPipe-0.032/, I get the following error:

Code: Select all

# perl Build.PL 
Can't locate Module/Build.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.5/i686-linux /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i686-linux /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.5/i686-linux /usr/lib/perl5/5.8.5 /usr/local/lib/site_perl .) at Build.PL line 1.
I can't find any Module::Bulid.pm file anywhere, so am I missing some basic perl tools?

Thanks for any help.
"You have to invite me in"
Top
pre__
n00b
n00b
Posts: 1
Joined: Sat Apr 02, 2005 1:29 pm

Re: torsmo Tips & Tricks

  • Quote

Post by pre__ » Sat Apr 02, 2005 1:33 pm

Arainach wrote:Sure, we've got a problems thread, but why not a tips and tricks thread? For posting useful ideas.

First, never underestimate the power of the execi command. I've used it for things like checking on Folding@Home unit Status, System Logs, etc. I've seen other people use it for things like monitoring weather. Incredibly powerful command.

Here's my current .torsmorc file - It's almost entirely borrowed from the Forums user who I give credit to at the top. I'm in the process of tweaking it to my liking, but when I first saw it I was like "This is what I've been trying to do for a few months", so when he posted his I decided to scrap my homemade .torsmorc and modify his (with credit, of course)

.torsmorc:

Code: Select all

# torsmo configuration
# Arainach's revisions, borrowed from Revisions by grad_guy from Gentoo Forums

# set to yes if you want tormo to be forked in the background
background no

# X font used, you can pick one with program xfontsel
#font 6x10
#font 7x13
#font 8x13
#font -*-clean-medium-r-*-*-12-*-*-*-*-*-*-*
#font -artwiz-kates-medium-*-*-*-14-*-*-*-*-*-*-*
#font -artwiz-kates-medium-*-normal-*-17-120-*-*-*-*-*-*
#font -*-webby caps-*-*-*-*-7-*-*-*-*-*-*-*
font -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-1
#font -*-terminus-*-*-*-*-*-*-*-*-*-*-*-*
#font -*-bitstream vera sans mono-medium-r-*-*-12-*-*-*-*-*-*-*
# mail spool
mail_spool $MAIL

# Update interval in seconds
update_interval 3.0

# Create own window instead of using desktop (required in nautilus)
own_window no

# Minimum size of text area
minimum_size 80 5

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no

# Draw borders naround text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_margin 4

# border width
border_width 1

# Default colors and also border colors
#default_color spring green
default_color light blue
default_shade_color black
default_outline_color black

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 10
gap_y 100

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# Possible variables to be used:
#
#      Variable         Arguments                  Description
#  acpiacadapter                     ACPI ac adapter state.
#  acpifan                           ACPI fan state
#  acpitemp                          ACPI temperature.
#  battery           (name)          Remaining capasity in ACPI or APM
#                                    battery. ACPI battery name can be
#                                    given as argument (default is BAT0).
#  buffers                           Amount of memory buffered
#  cached                            Amount of memory cached
#  color             (color)         Change drawing color to color
#  cpu                               CPU usage in percents
#  cpubar            (height)        Bar that shows CPU usage, height is
#                                    bar's height in pixels
#  downspeed         net             Download speed in kilobytes
#  downspeedf        net             Download speed in kilobytes with one
#                                    decimal
#  exec              shell command   Executes a shell command and displays
#                                    the output in torsmo. warning: this
#                                    takes a lot more resources than other
#                                    variables. I'd recommend coding wanted
#                                    behaviour in C and posting a patch :-).
#  execi             interval, shell Same as exec but with specific interval.
#                    command         Interval can't be less than
#                                    update_interval in configuration.
#  fs_bar            (height), (fs)  Bar that shows how much space is used on
#                                    a file system. height is the height in
#                                    pixels. fs is any file on that file
#                                    system.
#  fs_free           (fs)            Free space on a file system available
#                                    for users.
#  fs_free_perc      (fs)            Free percentage of space on a file
#                                    system available for users.
#  fs_size           (fs)            File system size
#  fs_used           (fs)            File system used space
#  hr                (height)        Horizontal line, height is the height in
#                                    pixels
#  i2c               (dev), type, n  I2C sensor from sysfs (Linux 2.6). dev
#                                    may be omitted if you have only one I2C
#                                    device. type is either in (or vol)
#                                    meaning voltage, fan meaning fan or temp
#                                    meaning temperature. n is number of the
#                                    sensor. See /sys/bus/i2c/devices/ on
#                                    your local computer.
#  kernel                            Kernel version
#  loadavg           (1), (2), (3)   System load average, 1 is for past 1
#                                    minute, 2 for past 5 minutes and 3 for
#                                    past 15 minutes.
#  machine                           Machine, i686 for example
#  mails                             Mail count in mail spool. You can use
#                                    program like fetchmail to get mails from
#                                    some server using your favourite
#                                    protocol. See also new_mails.
#  mem                               Amount of memory in use
#  membar            (height)        Bar that shows amount of memory in use
#  memmax                            Total amount of memory
#  memperc                           Percentage of memory in use
#  new_mails                         Unread mail count in mail spool.
#  nodename                          Hostname
#  outlinecolor      (color)         Change outline color
#  pre_exec          shell command   Executes a shell command one time before
#                                    torsmo displays anything and puts output
#                                    as text.
#  processes                         Total processes (sleeping and running)
#  running_processes                 Running processes (not sleeping),
#                                    requires Linux 2.6
#  shadecolor        (color)         Change shading color
#  stippled_hr       (space),        Stippled (dashed) horizontal line
#                    (height)
#  swapbar           (height)        Bar that shows amount of swap in use
#  swap                              Amount of swap in use
#  swapmax                           Total amount of swap
#  swapperc                          Percentage of swap in use
#  sysname                           System name, Linux for example
#  temp1                             Temperature #1 from i2c-sensors, same as
#                                    ${i2c temp 1}
#  temp2                             Temperature #2 from i2c-sensors, same as
#                                    ${i2c temp 2}
#  time              (format)        Local time, see man strftime to get more
#                                    information about format
#  totaldown         net             Total download, overflows at 4 GB on
#                                    Linux with 32-bit arch and there doesn't
#                                    seem to be a way to know how many times
#                                    it has already done that before torsmo
#                                    has started.
#  totalup           net             Total upload, this one too, may overflow
#  updates                           Number of updates (for debugging)
#  upspeed           net             Upload speed in kilobytes
#  upspeedf          net             Upload speed in kilobytes with one
#                                    decimal
#  uptime                            Uptime
#  uptime_short                      Uptime in a shorter format


# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument

# stuff after 'TEXT' will be formatted on screen

# ${color}$hr
# ${color}Mails: ${color slategrey}$mails${color} New: ${color slategrey}$new_mails${color}    |      ${color}Battery:${color slategrey} ${battery} %


#${color white}$nodename 
#${color white}${time %A,%e %B %G %Z  %H:%M:%S}  ${color}UpTime: ${color white}$uptime${color} 
#${color white}$sysname $kernel on $machine${color} ${color}Network:${color} Up:${color white} ${upspeed eth0} k/s${color} - Down:${color white} ${downspeed eth0} k/s
#$hr
#${color}CPU:${color white} $cpu%${color} (${color white}${loadavg 1} ${loadavg 2} ${loadavg 3}${color}) ${cpubar 5}
#${color}RAM: ${color white} $mem/$memmax - $memperc%${color} ${membar 5}
#${color}Swap:${color white} $swap/$swapmax - $swapperc%${color} ${swapbar 5}
#${color}hdb1:  ${color white}${fs_used /}/${fs_size /}${color} (${color white}${fs_free_perc /}%${color} free) ${fs_bar 5/}
#${color}hda5: ${color white}${fs_used /mnt/ehdd}/${fs_size /mnt/ehdd}${color} (${color white}${fs_free_perc /mnt/ehdd}%${color} free) ${fs_bar 5/mnt/ehdd}
#${color}hdb6: ${color white}${fs_used /mnt/fhdd}/${fs_size /mnt/fhdd}${color} (${color white}${fs_free_perc /mnt/fhdd}%${color} free) ${fs_bar 5/mnt/fhdd}

TEXT
${color slate blue}${time %a, }${color }${time %B %e %G} 
${color slate blue}${time %Z,    }${color }${time %H:%M:%S}
$hr
 ${execi 40000 cal}$hr
${color slate blue}UpTime: ${color }$uptime  
$hr
${color slate blue}Net :
     ${color}Up  :${color } ${upspeed eth0} k/s
     ${color}Down:${color } ${downspeed eth0} k/s ${color} 
$hr
${color slate blue}CPU :${color } $cpu%
     $cpubar
${color slate blue}RAM :${color } $memperc% $mem/$memmax
     $membar
${color slate blue}SWAP:${color } $swapperc% $swap/$swapmax
     $swapbar
$hr
${color slate blue}ROOT:            ${color }${fs_free_perc /}% 
     ${fs_free /}/${fs_size /}
     ${fs_bar /}
${color slate blue}STUFF:           ${color }${fs_free_perc /mnt/ehdd}% 
     ${fs_free /stuff}/${fs_size /mnt/ehdd}
     ${fs_bar /stuff}
$hr
${color slate blue}Weather :${color}
${execi 1800 tweather.sh Today}
$hr
${color slate blue}Tomorrow :${color}
${execi 1800 tweather.sh Tomorrow}
$hr
And here's tweather.sh:

Code: Select all

#!/bin/bash
city="DeWitt"
link=USMI0231.html
file=/tmp/weather.txt
location=http://weather.yahoo.com/forecast/$link

lynx -accept_all_cookies -dump $location > $file
begin=`cat -n $file | grep "Currently" | cut -d ' ' -f5`
end=`expr $begin + 40`

head -n $end $file > tmp.t
tail -n 41 tmp.t > $file

case $1 in
   Today)  head -n 6 $file | sed '3d' ;;
   Tomorrow)
      begin=`cat -n $file | grep 'Today Tomorrow' | cut -d ' ' -f5`
      end=`cat -n $file | grep 'Extended' | cut -d ' ' -f5`
      num=`expr $end - $begin - 1`
      end2=`expr $begin + 7`

      head -n $end2 $file > tmp.t
      tail -n 3 tmp.t | sed 's/sky/\n sky/' | sed '4d' ;;
   *) exit ;;
esac

rm tmp.t
rm $file
I have a problem with this one! When I start torsmo bash says :

Code: Select all

/bin/torsmo-0.18/tweather.sh: line 7: lynx: command not found
/bin/torsmo-0.18/tweather.sh: line 7: lynx: command not found
ist that because of the Distribution (Fedora Core 3)? please help!
Image
Top
killfire
l33t
l33t
User avatar
Posts: 618
Joined: Sat Oct 04, 2003 11:48 pm
Contact:
Contact killfire
Website

Re: torsmo Tips & Tricks

  • Quote

Post by killfire » Sat Apr 02, 2005 10:31 pm

pre__ wrote:
Arainach wrote:**snip**
I have a problem with this one! When I start torsmo bash says :

Code: Select all

/bin/torsmo-0.18/tweather.sh: line 7: lynx: command not found
/bin/torsmo-0.18/tweather.sh: line 7: lynx: command not found
ist that because of the Distribution (Fedora Core 3)? please help!
heres a hint. _INSTALL LYNX_!!!!
my website, built in HAppS: http://dbpatterson.com
an art (oil painting) website I built a pure python backend for: http://www.lydiajohnston.com
Top
safferli
n00b
n00b
Posts: 45
Joined: Wed Jan 14, 2004 12:57 pm

  • Quote

Post by safferli » Mon Apr 04, 2005 12:08 pm

Never again forget a birthday (or any anniversary...):

You'll need hsbirthdays, a small program to remind you of the birthdays. It's a haskell program, so you'll need a haskell compiler. If you've got one, emerge time is less than a minute, if you need to install the compiler, grab a few coffees.

1) Get the ebuild from http://www.cs.uu.nl/~andres/hsbirthdays ... 1.0.ebuild and put it into your portage overlay dir.
2) Emerge hsbirthdays
3) Fill your .hsbithdays file with the birthdays (an example file is in /usr/share/doc/hsbirthdays-1.0/)
4) Add something like this to your ~/.torsmorc:

Code: Select all

${color slate blue}Upcoming birthdays:${color }
${execi 40000 hsbirthdays --noyear -d 21}
$hr
5) That's it! If you don't like the age display, use the --noage option.
Top
nagash-
n00b
n00b
Posts: 24
Joined: Wed Apr 07, 2004 3:05 am

  • Quote

Post by nagash- » Tue Apr 05, 2005 1:01 pm

torsmo needs like a plugins interface, so people can write plugins in C (or other languages i suppose). then it would be even better :)
Top
hpestilence
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 82
Joined: Thu Dec 16, 2004 9:26 pm

  • Quote

Post by hpestilence » Tue Apr 05, 2005 4:06 pm

then call it tdesklets (text desklets) :D
When the plague descends from Heaven above only Darkness will be your one true ally.
Top
Post Reply

223 posts
  • Page 4 of 9
    • Jump to page:
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • …
  • 9
  • Next

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy