76
Zaurus - pdaXrom / Power Management
« on: September 12, 2006, 11:10:23 pm »
@pelrun: thanks for the info - if I'd known this back when I started the thread it would've saved some time! (the battery applet is compiled, not a python script so there is no dissecting as I couldn't even find the source)
@Dobby: I imagine such a script would go something like this:
(and you could run it every so often with atd)
@Dobby: I imagine such a script would go something like this:
Code: [Select]
#!/bin/sh
if [ ! -f ~/.apm_store ]; then
lightnpower.py --loadandquit
cat /proc/apm > ~/.apm_store
else
$CUR = $(cat /proc/apm)
$OLD = $(cat ~/.apm_store)
if [ ! "$OLD" = "$CUR" ]; then
lightnpower.py --loadandquit
cat /proc/apm > ~/.apm_store
fi
fi
(and you could run it every so often with atd)