Bug#738983: fdpowermon: document how to use scripted themes

2014-02-18 Thread Holger Levsen
Hi, On Montag, 17. Februar 2014, gregor herrmann wrote: Not sure if I have awesome ideas :) But I'm happy to share what I have. I consider that quite awesome :-) I'd rather put the example files as examples into /usr/share/doc/fdpowermon/examples/ instead of into the manpage. Copying

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-18 Thread Holger Levsen
Hi, On Montag, 17. Februar 2014, Wouter Verhelst wrote: # on the first discharge event (0 = first in the index, d for # discharge), call the suspend sub defined above Hm. I'm not sure I would refer to this as the first discharge event. When discharging, this would be the last range we'd

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-17 Thread Holger Levsen
Hi Wouter, one last^w^wanother question: events are only caused by state changes when discharging, or also when charging? I suppose just the former... :) cheers, Holger signature.asc Description: This is a digitally signed message part.

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-17 Thread Holger Levsen
Hi, attached are my first stabs for improved config file examples, showing how to make use of events... I'm a bit unsure how to differate between the default config as it's now and this theme, as for me it's the default. So maybe just stick these two files into /usr/share/fdpowermon/examples/

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-17 Thread gregor herrmann
On Mon, 17 Feb 2014 15:27:24 +0100, Holger Levsen wrote: attached are my first stabs for improved config file examples, showing how to make use of events... I'm a bit unsure how to differate between the default config as it's now and this theme, as for me it's the default. So maybe just

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-17 Thread Wouter Verhelst
On Mon, Feb 17, 2014 at 03:12:02PM +0100, Holger Levsen wrote: Hi Wouter, one last^w^wanother question: events are only caused by state changes when discharging, or also when charging? I suppose just the former... :) Both are possible; the final argument to set_event decides ('d' for

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-17 Thread Wouter Verhelst
Hi, On Mon, Feb 17, 2014 at 05:08:59PM +0100, gregor herrmann wrote: === # Copy this file to ~/.config/fdpowermon/theme.pl. # # If you don't like the 'default' theme, define a new one by copying # /etc/fdpowermon/theme.cfg to ~/.config/fdpowermon/theme.cfg and # renaming/adjusting the

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-17 Thread gregor herrmann
On Mon, 17 Feb 2014 22:12:06 +0100, Wouter Verhelst wrote: # on the first discharge event (0 = first in the index, d for # discharge), call the suspend sub defined above Hm. I'm not sure I would refer to this as the first discharge event. That was Holger's text which I copied :) When

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-16 Thread Wouter Verhelst
On Sat, Feb 15, 2014 at 07:22:02PM +0100, Holger Levsen wrote: Hi, On Samstag, 15. Februar 2014, Wouter Verhelst wrote: The two .png files cause the icon to alternate between two states. ok, thats easy to understand. Good :-) The $theme-set_event causes the sub to be called. ok,

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-16 Thread Holger Levsen
Hi Wouter, On Sonntag, 16. Februar 2014, Wouter Verhelst wrote: ok, but what events are there? I still don't get this part. An event is the transitioning from one battery level range to the next. Aaaah! Let's take this line from the manpage: discharging = 2:missing.png:low.png,

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-16 Thread Wouter Verhelst
On Sun, Feb 16, 2014 at 11:14:23AM +0100, Holger Levsen wrote: On Sonntag, 16. Februar 2014, Wouter Verhelst wrote: [...] Let's take this line from the manpage: discharging = 2:missing.png:low.png, 10:low.png, 100:full.png This means there's a range from 0 to 2 (inclusive),

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-15 Thread Holger Levsen
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 {

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-15 Thread Holger Levsen
Hi, On Samstag, 15. Februar 2014, Holger Levsen wrote: 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'); with that I

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-15 Thread Wouter Verhelst
On Sat, Feb 15, 2014 at 01:08:07PM +0100, Holger Levsen wrote: Hi, On Samstag, 15. Februar 2014, Holger Levsen wrote: matrix:~$ cat /etc/fdpowermon/theme.pl sub suspend { system(sudo pm-suspend); } my $theme =

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-15 Thread Wouter Verhelst
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

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-15 Thread Holger Levsen
Hi Wouter, On Samstag, 15. Februar 2014, Wouter Verhelst wrote: 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

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-15 Thread Wouter Verhelst
On Sat, Feb 15, 2014 at 01:51:43PM +0100, Holger Levsen wrote: Hi Wouter, On Samstag, 15. Februar 2014, Wouter Verhelst wrote: 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

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-15 Thread Holger Levsen
Hi, On Samstag, 15. Februar 2014, Wouter Verhelst wrote: The two .png files cause the icon to alternate between two states. ok, thats easy to understand. The $theme-set_event causes the sub to be called. ok, but what events are there? I still don't get this part. cheers, Holger

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-14 Thread Holger Levsen
package: fdpowermon severity: wishlist Hi Wouter, please document how to use scripted themes as introduced by fixing #694751. Gregors example from this bug, action = 80:sudo pm-suspend doesnt seem to work, as grepping for action in the source code revealed. Documentation is nice anyway.

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-14 Thread Wouter Verhelst
On Fri, Feb 14, 2014 at 03:29:33PM +0100, Holger Levsen wrote: package: fdpowermon severity: wishlist Hi Wouter, please document how to use scripted themes as introduced by fixing #694751. Gregors example from this bug, action = 80:sudo pm-suspend doesnt seem to work, as grepping

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-14 Thread Holger Levsen
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

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-14 Thread Wouter Verhelst
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

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-14 Thread Holger Levsen
Hi, On Freitag, 14. Februar 2014, Wouter Verhelst wrote: 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? just tell what lines need to be put in theme.cfg so that it runs pm-suspend when

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-14 Thread Wouter Verhelst
On Fri, Feb 14, 2014 at 06:37:08PM +0100, Holger Levsen wrote: Hi, On Freitag, 14. Februar 2014, Wouter Verhelst wrote: 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? just tell what

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-14 Thread Holger Levsen
Hi Wouter, On Freitag, 14. Februar 2014, Wouter Verhelst wrote: Nothing. Instead, you create a ~/.config/fdpowermon/theme.pl with those five lines. Ah!!! So nothing in /etc Thanks! I'll try to clear that up a bit. yes, please! cheers, Holger signature.asc Description: This

Bug#738983: fdpowermon: document how to use scripted themes

2014-02-14 Thread Wouter Verhelst
On Fri, Feb 14, 2014 at 10:45:39PM +0100, Holger Levsen wrote: Hi Wouter, On Freitag, 14. Februar 2014, Wouter Verhelst wrote: Nothing. Instead, you create a ~/.config/fdpowermon/theme.pl with those five lines. Ah!!! So nothing in /etc that can also be done -- but the perl code