The Following User Says Thank You to albright For This Useful Post: | ||
![]() |
2008-01-21
, 21:50
|
Posts: 145 |
Thanked: 32 times |
Joined on Dec 2007
|
#2
|
![]() |
2008-01-22
, 14:32
|
|
Posts: 538 |
Thanked: 168 times |
Joined on Dec 2007
@ Seattle
|
#3
|
![]() |
2008-01-22
, 16:10
|
|
Posts: 3,096 |
Thanked: 1,525 times |
Joined on Jan 2006
@ Michigan, USA
|
#4
|
![]() |
2008-01-22
, 16:17
|
Posts: 145 |
Thanked: 32 times |
Joined on Dec 2007
|
#5
|
Can't I just replace the <"10" with <"15" and have it work?
play-sound /usr/local/kde/share/sounds/KDE_Notify.wav
![]() |
2008-01-22
, 18:24
|
Posts: 145 |
Thanked: 32 times |
Joined on Dec 2007
|
#6
|
#!/bin/sh while true do sleep 600 X=`battery-status | awk '{print $4}'` if [ ${#X} -lt 5 ] && [ "$X" != "Charging" ] then play-sound /usr/local/kde/share/sounds/KDE_Notify.wav kdialog --title "Battery Status" --msgbox ". . . . . . . . . $X . . . . . . . . ." fi done
![]() |
2008-01-23
, 12:00
|
Posts: 145 |
Thanked: 32 times |
Joined on Dec 2007
|
#7
|
killall battery-status
![]() |
2008-01-27
, 18:23
|
Posts: 145 |
Thanked: 32 times |
Joined on Dec 2007
|
#8
|
X=`battery-status | awk '{print $4}'` flite -t "battery status $X" &
![]() |
2008-01-28
, 16:33
|
Posts: 145 |
Thanked: 32 times |
Joined on Dec 2007
|
#9
|
keycode 48 = apostrophe quoteleft question question question question
![]() |
Tags |
battery, deprecated, kde, kde35 |
|
perpetually, checking the battery status
every five minutes. It will pop up a message
when the battery level falls below 10%.
the above works for me.
Of course, without the while loop, sleep etc the X=
and kdialog lines can form a script to get a popup
of the battery level whenever you want. But in that
case, this is better:
that explains all the "dots").
You could put the first script in ~/.kde/Autostart
It does not seem to use any cpu that I can notice. One problem is
that the "busy cursor" bounces or blinks for the full timeout. I
wonder if there is a way to disable launch notification for particular
apps ...
Oh, and by the way, if you want to get rid of the script you'll
have to kill it from command line.