On Sat, Feb 15, 2014 at 10:17:35AM +0100, Holger Levsen wrote: > 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)
Correct; the example in the manpage refers to the .cfg example in the manpage, which also uses "mytheme". > and how+where to define that I want pm-suspend to be run if battery > goes below 3% ?! You would need to have a step at 3%, which you currently don't. The easiest option is probably to change the first step in the "discharging" configuration to say "3:battery-missing.png:battery-low.png", rather than the "2" it says currently. > 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... No, that will make it alternate between the two at 3-second intervals (a way to get your attention that the battery is really really low now and you should connect to power _now_). The manpage mentions this, too ;-) -- This end should point toward the ground if you want to go to space. If it starts pointing toward space you are having a bad problem and you will not go to space today. -- http://xkcd.com/1133/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org