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, 10:low.png, 100:full.png
> 
> This means there's a range from 0 to 2 (inclusive), one from 3 to 10,
> and one from 11 to 100.
> 
> When you're running on battery, and the battery level goes from >= 11 to
> <= 10, you move from one range to another. This is when the event
> triggers.

So far I think the concept is very clear... (I'll need to dig into the manpage 
to see if I think it's described equally clearly there :)

> The event you set should be set on the range you enter; in the above
> example, it should be set on the 3 to 10 range; that is, the code should
> say
> 
> $theme->set_event(1, \&suspend, 'd')
> 
> because the first range (0 to 2) is the range with index 0, and the
> second range (3 to 10) is the range with index 1.

Ah, wow. That's less clear / intuitive, I think.

I'll see if I can come up with either an improvement to the manpage or some 
more commented example theme.cfg/.pl files, so that future users will 
understand easier faster :-)

Maybe it's just a comment above the "$theme->set_event" line, but I have to 
admin I've just skimmed the part in the manpage with the perl lines, as I 
thought (and think) I wanted something very simple and standard. (Even though 
I knew that suspend was not standard functionality of fdpowermon.. :)


cheers,
        Holger

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to