[Goodies-dev] Genmon plugin

Juju jujucece at gmail.com
Mon Jul 3 17:27:50 CEST 2006


Hi,

Some months ago, I modified the genmon plugin (for panel 4.2) to add
some functionalities.

Now, the script that genmon spawns every x seconds, can generate a
simple XML file containing some data :
- The icon
- The tooltip (if you want a special tooltip)
- The text
- The percentage of the bar (if you want the plugin to display a bar)

With that improvement, you can simply create a cute plugin to monitor
what you want on your computer : You just have to develop a little
script.

Here's a example script which displays the t° of the CPU and the freq
in a tooltip :
######################################
#!/bin/bash
echo "<img>/usr/local/share/icons/Tango/16x16/apps/utilities-system-monitor.png</img>"

declare -i cpuFreq
cpuFreq=$(cat /proc/cpuinfo | grep "cpu MHz" | sed 's/\ \ */ /g' | cut
-f3 -d" " | cut -f1 -d".")

if [ $cpuFreq -ge 1000 ]
then
  cpu=$(echo $cpuFreq | cut -c1).$(echo $cpuFreq | cut -c2)GHz
else
  cpu=${cpuFreq}MHz
fi
echo "<txt>"$(cat /proc/acpi/thermal_zone/THM/temperature | sed 's/\ \
*/ /g' |cut -f2 -d" ")"°C</txt>"
echo "<tool>Freq: "$cpu"</tool>"
######################################

Actually, I use it to monitor my batteries (the normal battery plugin
doesn't understand when you have 2 batteries), the t° of my CPU and
disk, and the WiFi quality (in my opinion, the WaveLAN plugin is not
very well designed : too big, not well integrated in Xfce)

I'll soonly port my modifications to Xfce 4.4, but my linuxBox is on
Fedora Core 4, so I'll probably have to wait a bit to have packages of
Xfce 4.4 (or do you have any tricks to install cleanly Xfce 4.4 on FC4
?)

If you have any questions or remarks to help me developing this
plugin, don't hesitate...

See you...
Juju
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CaptGenMon.png
Type: image/png
Size: 6949 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/goodies-dev/attachments/20060703/d9c1cec8/attachment.png>


More information about the Goodies-dev mailing list