Hi Wouter, On Samstag, 15. Februar 2014, Wouter Verhelst wrote: > > Ah!!! So nothing in /etc.... > that can also be done -- but the perl code needs to go in a .pl file, > not in a .cfg file.
ok, so now I have:
matrix:~$ cat /etc/fdpowermon/theme.pl
sub suspend {
system("sudo pm-suspend");
}
my $theme = fdpowermon::theme::get_theme("mytheme");
$theme->set_event(0, \&suspend, 'd');
matrix:~$ cat /etc/fdpowermon/theme.cfg
[default]
steps = 7
dir = /usr/share/icons/oxygen/22x22/status
charging = 0:battery-charging-low.png, 10:battery-charging-low.png,
30:battery-charging-caution.png, 50:battery-charging-040.png,
70:battery-charging-060.png, 90:battery-
charging-080.png,99:battery-charging.png
discharging =
2:battery-missing.png:battery-low.png,10:battery-low.png,30:battery-caution.png,50:battery-040.png,70:battery-060.png,90:battery-080.png,100:battery-100.png
matrix:~$
but I suspect this has at least two problems: "mytheme" should be "default" (or
vice versa) and how+where to define that I want pm-suspend to be run if battery
goes below 3% ?!
Thanks for your patience! I hope this will help you to document this in a way
you'll won't get this question again :)
cheers,
Holger
P.S.: ain't there a mistake in the default theme.cfg:
"discharging = 2:battery-missing.png:battery-low.png,10:battery-low.png" looks
like there is one battery-low.png too many...
signature.asc
Description: This is a digitally signed message part.

