Notices


Reply
Thread Tools
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#601
You'll have to enable the time calculating first. As root:

Code:
qdbus --system org.freedesktop.Hal /org/freedesktop/Hal/devices/bme org.free desktop.Hal.Device.SetPropertyBoolean battery.remaining_time.calculate_per_time true
After a little while MK99's qdus command will give out the remaining time (in minutes, I assume).

EDIT:

Spoke too soon. I thought it worked because I got something other than 0 after setting that key to 'true'. Turns out I just plugged it in and that changed the remaining time value, not the change to the battery.remaining_time.calculate_per_time key. Sorry...

Last edited by slarti; 2013-02-13 at 16:46.
 

The Following 2 Users Say Thank You to slarti For This Useful Post:
Posts: 9 | Thanked: 0 times | Joined on Mar 2012 @ Hungary
#602
and could not be put only the path?
from Settings-Device-Battery
just guessing
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#603
MeeGo::QmBattery::getRemainingIdleTime in Qt
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#604
depends: python-qmsystem

Code:
#!/usr/bin/python

import QmSystem

batt = QmSystem.QmBattery()
#time = batt.getRemainingIdleTime(QmSystem.QmBattery.NormalMode)
time = batt.getRemainingTalkTime(QmSystem.QmBattery.NormalMode)
hours,mod = divmod(time,3600)
mins,secs = divmod(mod,60)
result = ''
if hours>0:
        result+=str(hours)+' hour(s) '
if mins>0:
        result+=str(mins)+' minute(s) '
result+=str(secs)+' second(s)'
print result
in Billboard:
Code:
{script:/path/to/script.py 2>/dev/null}
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following 4 Users Say Thank You to coderus For This Useful Post:
Posts: 87 | Thanked: 14 times | Joined on Jan 2012
#605
It doesn't work for me and the bluetooth consumtion script doesn't work for me too. But, i flashed my N9 recently, so, am i missing to install extra python packages to make it work? Thanks in advance.
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#606
Sorry, Vanga mode is off today.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 
Posts: 9 | Thanked: 0 times | Joined on Mar 2012 @ Hungary
#607
It's too complicated for me...
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#608
Sorry, i can't help you to use copy-paste. You should born with this skill. Nobody can teach you if you can't. RI'm very sorry, really.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
Posts: 9 | Thanked: 0 times | Joined on Mar 2012 @ Hungary
#609
I very much thank you for trying to help you!
You're doing a great job!
I'm going to learn.

Thank you again!
 
Posts: 59 | Thanked: 168 times | Joined on Mar 2010 @ Finland
#610
Would it be somehow possible to hook-up and extract battery information (Idle, average, active current consumption etc.) provided by battery usage app by using shell or python scripts ?
 
Reply


 
Forum Jump


All times are GMT. The time now is 12:56.