Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
torsmo Tips & Tricks
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
reksav
Apprentice
Apprentice


Joined: 09 Mar 2005
Posts: 165
Location: rochester, ny

PostPosted: Wed Mar 09, 2005 4:53 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
thoughts
Apprentice
Apprentice


Joined: 15 Apr 2004
Posts: 153
Location: Pennsylvania

PostPosted: Wed Mar 09, 2005 7:17 am    Post subject: Reply with quote

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/
Back to top
View user's profile Send private message
orphansandoligarchs
n00b
n00b


Joined: 22 Sep 2004
Posts: 7
Location: Northants, England

PostPosted: Wed Mar 09, 2005 4:53 pm    Post subject: Reply with quote

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:

#!/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:
./filename.sh (-f | -u) (filesystems)

-f gives free space, -u gives used space
So in the torsmorc I'm using
Code:
${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 :)
Back to top
View user's profile Send private message
Maximus2000
Tux's lil' helper
Tux's lil' helper


Joined: 07 Oct 2004
Posts: 127
Location: USA

PostPosted: Wed Mar 09, 2005 9:48 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
reksav
Apprentice
Apprentice


Joined: 09 Mar 2005
Posts: 165
Location: rochester, ny

PostPosted: Thu Mar 10, 2005 4:03 pm    Post subject: Reply with quote

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

Code:
/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.
Back to top
View user's profile Send private message
orphansandoligarchs
n00b
n00b


Joined: 22 Sep 2004
Posts: 7
Location: Northants, England

PostPosted: Thu Mar 10, 2005 5:35 pm    Post subject: Reply with quote

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

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!
Back to top
View user's profile Send private message
reksav
Apprentice
Apprentice


Joined: 09 Mar 2005
Posts: 165
Location: rochester, ny

PostPosted: Thu Mar 10, 2005 9:26 pm    Post subject: Reply with quote

that did it, works perfectly :) thanks a ton
Back to top
View user's profile Send private message
ShyGuy91284
Tux's lil' helper
Tux's lil' helper


Joined: 28 Mar 2004
Posts: 114

PostPosted: Mon Mar 14, 2005 3:38 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
latz-twn
Tux's lil' helper
Tux's lil' helper


Joined: 08 Nov 2003
Posts: 95
Location: Luxembourg

PostPosted: Mon Mar 14, 2005 1:36 pm    Post subject: Reply with quote

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:

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:

#!/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:

${execi 1800 whereTO/showUpgrades.sh}



I hope this is usefule to anybody! Cyas Nice thread btw! This was needed!
_________________
LinuxCounter: #353618
Back to top
View user's profile Send private message
kamisama
n00b
n00b


Joined: 27 Apr 2004
Posts: 41

PostPosted: Mon Mar 14, 2005 3:13 pm    Post subject: hey guys Reply with quote

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.
Back to top
View user's profile Send private message
ilythiiri
n00b
n00b


Joined: 17 Jan 2005
Posts: 22
Location: Temuco, Chile

PostPosted: Mon Mar 14, 2005 3:26 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
marcus
n00b
n00b


Joined: 20 Jun 2002
Posts: 37
Location: Skjern, Denmark

PostPosted: Sat Mar 19, 2005 2:40 am    Post subject: Reply with quote

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

Code:
# 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
Back to top
View user's profile Send private message
Arainach
l33t
l33t


Joined: 08 Jul 2004
Posts: 609

PostPosted: Sat Mar 19, 2005 2:57 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
marcus
n00b
n00b


Joined: 20 Jun 2002
Posts: 37
Location: Skjern, Denmark

PostPosted: Sat Mar 19, 2005 3:15 am    Post subject: Reply with quote

With multiple .torsmorc files?
Back to top
View user's profile Send private message
Arainach
l33t
l33t


Joined: 08 Jul 2004
Posts: 609

PostPosted: Sat Mar 19, 2005 5:32 am    Post subject: Reply with quote

By running
Code:
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
Back to top
View user's profile Send private message
VoiDeR
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2003
Posts: 122

PostPosted: Sat Mar 19, 2005 5:50 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
nucular
n00b
n00b


Joined: 23 Feb 2005
Posts: 11
Location: Finland

PostPosted: Sat Mar 19, 2005 8:51 am    Post subject: Reply with quote

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:

 ${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
Back to top
View user's profile Send private message
CitizenX
Apprentice
Apprentice


Joined: 11 Sep 2004
Posts: 158
Location: Fresno, CA

PostPosted: Sat Mar 19, 2005 10:10 am    Post subject: Reply with quote

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:
double_buffer no


or

Code:
own_window yes
Back to top
View user's profile Send private message
ahlen
n00b
n00b


Joined: 12 May 2004
Posts: 17
Location: Linköping, Sweden

PostPosted: Tue Mar 29, 2005 10:25 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3745
Location: sleeping in the bathtub

PostPosted: Wed Mar 30, 2005 1:55 am    Post subject: Reply with quote

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:
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:
# 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"
Back to top
View user's profile Send private message
pre__
n00b
n00b


Joined: 02 Apr 2005
Posts: 1

PostPosted: Sat Apr 02, 2005 1:33 pm    Post subject: Re: torsmo Tips & Tricks Reply with quote

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:
# 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:
#!/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:
/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!
_________________
[img:bf0de1d587]http://fool.capellan.ru/sm/alc.gif[/img:bf0de1d587]
Back to top
View user's profile Send private message
killfire
l33t
l33t


Joined: 04 Oct 2003
Posts: 618

PostPosted: Sat Apr 02, 2005 10:31 pm    Post subject: Re: torsmo Tips & Tricks Reply with quote

pre__ wrote:
Arainach wrote:
**snip**

I have a problem with this one! When I start torsmo bash says :
Code:
/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
Back to top
View user's profile Send private message
safferli
n00b
n00b


Joined: 14 Jan 2004
Posts: 45

PostPosted: Mon Apr 04, 2005 12:08 pm    Post subject: Reply with quote

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/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:
${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.
Back to top
View user's profile Send private message
nagash-
n00b
n00b


Joined: 07 Apr 2004
Posts: 24

PostPosted: Tue Apr 05, 2005 1:01 pm    Post subject: Reply with quote

torsmo needs like a plugins interface, so people can write plugins in C (or other languages i suppose). then it would be even better :)
Back to top
View user's profile Send private message
hpestilence
Tux's lil' helper
Tux's lil' helper


Joined: 16 Dec 2004
Posts: 82

PostPosted: Tue Apr 05, 2005 4:06 pm    Post subject: Reply with quote

then call it tdesklets (text desklets) :D
_________________
When the plague descends from Heaven above only Darkness will be your one true ally.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 4 of 9

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum