Thread
:
[Announce] LockScreenQuotes for N9 (Alpha ver of USbS avalable)
View Single Post
aRTee
2012-01-14 , 15:49
Posts: 188 | Thanked: 90 times | Joined on Sep 2006
#
7
rzr, are you in the right thread..?
Anyway, I modified things as such:
added this line to /usr/bin/lockscreenquotes.sh
lshal | grep battery.charge_level.percentage | awk '{print $3}' > /home/user/lsq/batterylevel.txt
(note: I used the dir lsq for the user stuff)
and these to the python script somewhere at the top:
# read batterylevel from file
file = open("batterylevel.txt")
BATTERYLEVEL = int(file.readline())
file.close()
#BATTERYLEVEL colour change
if BATTERYLEVEL < 10:
FONT_COLOR = (255, 0, 0)
elif BATTERYLEVEL < 20:
FONT_COLOR = (255, 255, 0)
elif BATTERYLEVEL < 50:
FONT_COLOR = (0, 255, 0)
elif BATTERYLEVEL < 90:
FONT_COLOR = (0, 255, 255)
else:
FONT_COLOR = (255, 255, 255)
__________________
If I said something useful, please hit the 'Thanks!' link related to that post.
Quote & Reply
|
The Following User Says Thank You to aRTee For This Useful Post:
ejasmudar
aRTee
View Public Profile
Send a private message to aRTee
Find all posts by aRTee