← Back to team overview

torios-dev team mailing list archive

Batteri

 

Hi everyone,
I have updated my little battery monitor program.  I am not entirely
sure if suspend on lid close works yet or not....  However, I have a
nice battery tray applet!  It has menu items for suspend and hibernate. 
It also has a detailed power information dialog box.
NOTES:
- There is also a rather lame looking about dialog.  Please excuse how
lame it looks... I have only been programming in C using gtk for about a
week.  So it is a new language and a new graphical toolkit.
- There are also missing menu icons for suspend and hibernate... I
didn't quite figure out how to use theme relative icons for non stock
images (like quit, about and info).
- It may not suspend on laptop lid close, or it might loop suspend (see
bottom of e-mail) I still don't entirely understand signals (FLTK only
uses callbacks, not signals), or what the lid closed notification signal
is exactly.. I think it is notify::lid-is-closed but I am not entirely sure.

That said, it is a much nicer battery monitor (at least to me).  The
tooltip (when you hover over the icon) gives the exact percentage and
discharging time in hours... the hours are a decimal number still, but
it is much more readable than seconds :)

so, I have added this to the ToriOS core repo (it is already on your
ToriOS box).
So, sudo apt-get update && sudo apt-get install batteri
should do the trick!
You can get more printout on the terminal line (basically the info from
the about dialog with some things highlighted up top) by running
batteri -v
You can test suspend on lid close by running
batteri -s
I am using getopt so you can even run
batteri -sv
if you like :)
Please test it from a terminal if you are going to enable the suspend
option.  This way you can Ctrl + C it if you need to stop it from
suspending, or something else.... of course the suspend on lid close may
simply not work yet.  I found that 14.10 has some sort of odd hidden
mechanism for suspending...  I do not know how to disable it (no power
manager is running) so it must be some sort of gsettings/gconf/xconf/etc
option interacting underneath the hidden layers of computer
configurations and background processes.

Launchpad is taking an inordinate amount of time to build... so it may
be quite some time before this reaches the repos.

I am also hosting it on github if you like to compile things :)

-- 
Regards

-Israel
ToriOS Team



Follow ups