On Fri, Feb 14, 2014 at 05:45:56PM +0100, Holger Levsen wrote: > control: reopen -1 > control: retitle -1 document how to use scripted themes in theme.cfg > > Hi Wouter, > > On Freitag, 14. Februar 2014, Wouter Verhelst wrote: > > There's a manpage which documents how to use it... > > that manpage doesnt give useful hints how to configure this, at least not for > people who are not much into perl... so I read (and have read there, when > filing this bug!) this: > > ----- > > However, unless you want to build the theme dynamically, doing it this > way is not recommended. Instead, you would build the theme from a .cfg file, > and possibly modify it from perl. Let's say you wish to add an event to > suspend the system when the > power gets low; in that case, you'd do something like this: > > sub suspend { > system("sudo pm-suspend"); > } > > my $theme = fdpowermon::theme::get_theme("mytheme"); > $theme->set_event(0, \&suspend, 'd'); > > -------- > > Do you mean I should add the last 5 lines (starting at "sub suspend") to > theme.cfg?
No. > Maybe you could make this clearer in the manpage or supply a more > "bloated"/advanced/you_name_it theme.cfg in > /usr/share/doc/fdpowermon/examples/ ?! > > I'd like to use this feature and I dont want to ask Gregor how to. I'd rather > be able to learn this from installing the package ;-) DESCRIPTION This program allows one to display a "battery level" icon in any freedesktop.org-compliant status area. It can be themed through either a plain-text configuration file (/etc/fdpowermon/theme.cfg or $HOME/.config/fdpowermon/theme.cfg), or through a short perl script (/etc/fdpowermon/theme.pl or $HOME/.config/fdpowermon/theme.pl). The former is easier, as it doesn't require any scripting; and indeed the default configuration is an example of such a plain-text theme. However, the latter allows for more flexibility, as one can define callbacks that should be run when the battery level reaches a certain threshold. I suspect that isn't clear enough, then, and that I should reword some bits. Can you point me towards the parts that you think should be clarified? -- 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