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), 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 :)

You do that.

> > 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.

Maybe.

The reason for this API is that it keeps the fdpowermon code simple; I
suppose I could add a call where you specify the range by percent rather
than by the index of the range in the array that's passed, but that
would require me to add a whole bunch of stuff just so I can easily
figure out which element is the one we need.

One of the design goals of fdpowermon is that it should be simple enough
for people to understand. Adding such a call would therefore be counter
to that goal.

> 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 :-)

That'd be nice, thanks.

> 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.. :)

Yes, well. I only added it because Gregor specifically asked for that
functionality; I don't actually use that part myself, and that's not
likely to change :-)

-- 
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

Reply via email to