Tux's lil' helper
Joined: 13 Oct 2003
Location: Milan (Italy)
|Posted: Sat Jul 10, 2004 9:47 pm Post subject: [TIP] GKRELLM low battery alarm
|Here is a little tip about how to have gkrellm warn you when your battery is low. I am writing this because I would have liked to find this post when I was trying to solve this problem myself.
It's really simple, using osd_cat (emerge xosd).
Go to the Setup->Alerts section for the battery, set the Low limits (I put 15 (%) for the warn limit and 10 for the alarm limit) and add for Alarm command:
|osd_cat -d 5 -p middle -A center -f '-adobe-helvetica-bold-r-normal-*-*-320-*-*-p-*-iso8859-1' -O 5 /home/silvero/.gkrellm2/battery_critical |
and for Warn command:
|osd_cat -d 5 -p middle -A center -f '-adobe-helvetica-bold-r-normal-*-*-320-*-*-p-*-iso8859-1' -O 5 /home/silvero/.gkrellm2/battery_low |
For the repeat intervals in seconds, I put 10 and 30 (Alarm - Warn). In battery_critical text file I put:
|WARNING!!! BATTERY CRITICAL!!! |
and in the battery_low text file I put
|Warning!!! Battery low. |
This way, you'll get a cool big red notice with a black outline right over what you're doing that warns you. The style of the text is like the one you get on the TV screen when you use a remote control to raise-lower the volume, etc.... I have a 1920x1200 screen resolution, so you may have to change the font.... you might also want to add shadows, change the color....
When I get to it, I will work on an acustic warning and an auto-shutdown script if the battery goes below 4% (unless someone posts to this thread with solutions for these other features).
(things aren't all black or all white)
Last edited by SilveRo on Sat Oct 09, 2004 6:10 pm; edited 1 time in total