Notices


Reply
Thread Tools
ejasmudar's Avatar
Posts: 800 | Thanked: 957 times | Joined on Sep 2010 @ India
#1
As I have mentioned in this thread, I was working on a python script to display random quotes from a textfile onto the Lock/Standby Screen.
I have now packaged it, but please remember this is still beta testing only.

PREREQUISITE
1. You should modify the file mentioned in this post so as to enable Operator Logo.
2. ie, under "LockScreen MImageWidgetStyle#LockScreenLowPowerModeOperatorLo go"
change the entries to as follows (if not present, add):
Code:
minimum-size: 45mm 45mm; 
maximum-size: 45mm 45mm;
INSTRUCTIONS
1. Install attached deb
2. Open Terminal
3. Enter the command:
Code:
LockScreenQuotes.sh
Now lock the device and if everything has gone right it should be showing a quote under the clock. [see attachment]

NOTES
1 As of now, I've disabled running the script in background mode (ie, u will have to keep terminal open for the script to show random quotes). This is because this is still a beta version and I want to know if/what errors popup. Silent version and autostart will be included in later versions.
2 Most of the settings can be changed by editing the file /home/user/LOCKSCREENQUOTES/LockScreenQuote.py. It is pretty well commented and must be self explanatory.
3 You can use your own font/text file. Just note that the text file should have one quote per line and must not have wierd characters (I'll try to fix this later)
4 Python, python-imagin and python-gconf are the dependencies. The application manager should automatically install this. If not please inform me. You can also install it manually by apt-get.

FINALLY, I'M REMINDING YOU AGAIN THAT THIS IS ONLY A BETA SOFTWARE AND USE IT WITH CAUTION.

UPDATE: 7/5/2012
See this post for a newer version(not packaged yet) http://talk.maemo.org/showpost.php?p...0&postcount=38
Attached Images
 
Attached Files
File Type: deb LSQ.deb (427.5 KB, 394 views)
__________________
My Device History:Nokia 3510 > SE T230 > Nokia 6600 > HP2210 > SE p910i > SE p990i > N95 > I-mate 9502 > itouch > Nokia N900 > ? N9
My apps for N900:
Conversation Modder

My apps for N9:
LockScreenQuotes
USbS


If you feel I have helped you, don't forget to press Thanks!

Last edited by ejasmudar; 2012-05-06 at 13:00.
 

The Following 16 Users Say Thank You to ejasmudar For This Useful Post:
Posts: 188 | Thanked: 90 times | Joined on Sep 2006
#2
Great, love it, thanks a lot!

Some feedback:
I have some longer and some shorter quotes, and your mechanism to select a quote is based on randomly picking a position in the file, then taking the following full line - this way, the quotes after the longest quotes are favoured...

Otherwise, I made the quote image max size bigger (450x450), and chose green as text colour (reducing total luminocity and power drain by 50%) to accomodate for the longer quotes...


Keep up the good work!
 

The Following User Says Thank You to aRTee For This Useful Post:
ejasmudar's Avatar
Posts: 800 | Thanked: 957 times | Joined on Sep 2010 @ India
#3
Thanks for the feedback!

You're right about the random selection. Hmm... so just selecting a random line would be better, right?

Now that I know it is working, I'll provide an update with autostart and better config files.
__________________
My Device History:Nokia 3510 > SE T230 > Nokia 6600 > HP2210 > SE p910i > SE p990i > N95 > I-mate 9502 > itouch > Nokia N900 > ? N9
My apps for N900:
Conversation Modder

My apps for N9:
LockScreenQuotes
USbS


If you feel I have helped you, don't forget to press Thanks!
 

The Following 2 Users Say Thank You to ejasmudar For This Useful Post:
Posts: 188 | Thanked: 90 times | Joined on Sep 2006
#4
OH btw, forgot to mention that I didn't manage to install it, so I just put the files in the respective locations.

I tried to install it, but had do use the command line only (ssh - my better half was reading an ebook, so I couldn't use the phone itself) and I don't have much experience with Debian, so when the dpkg command failed, I just placed the files where they belonged as per the .deb file...

BTW I never saw any error when using the app (from the cli), all is fine there.
__________________
If I said something useful, please hit the 'Thanks!' link related to that post.
 

The Following User Says Thank You to aRTee For This Useful Post:
Posts: 188 | Thanked: 90 times | Joined on Sep 2006
#5
Additional idea, it would be cool to change the text colour according to the battery level...:
magenta/blue for high levels (00FFFF)
below 50% or so green (00FF00)
below 25% or so yellow (FFFF00)
and below 10% or so red (FF0000)

Getting the battery percentage is as easy as
lshal | grep percent
which on my device tells me:
battery.charge_level.percentage = 49 (0x31) (int)
perhaps there's an easier way, reading a file from /proc or so (I have 0 skill with python, no idea how to incorporate the above lshal command into this script).

Note also that green will render the sharpest text (I put longer quotes so I use a smaller font for things to fit).
__________________
If I said something useful, please hit the 'Thanks!' link related to that post.
 

The Following User Says Thank You to aRTee For This Useful Post:
www.rzr.online.fr's Avatar
Posts: 1,348 | Thanked: 1,863 times | Joined on Jan 2009 @ fr/35/rennes
#6
I can try to rebuild from sources ...
__________________
Current obsession:

https://purl.org/rzr/abandonware

Please help to list all maemo existing apps :

https://github.com/abandonware/aband...ment-578143760

https://wiki.maemo.org/Apps#

I am looking for " 4 inch TFT LCD display screen " for Nokia n950 HandSet

http://rzr.online.fr/q/lcd


Also, I need online storage to archive files :

http://db.tt/gn5Qffd6#

https://my.pcloud.com/#page=register...e=g8ikZmcfEJy#
 
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.
 

The Following User Says Thank You to aRTee For This Useful Post:
ejasmudar's Avatar
Posts: 800 | Thanked: 957 times | Joined on Sep 2010 @ India
#8
Instead of dpkg -i, did u try installing from file filemanager directly? It should work.

Battery percentage is a brilliant idea and also easy to implement. I'm currently busy with some admission proceedures, so no time frame, but I'll try to do it soon. Thanks for testingit out BTW.
__________________
My Device History:Nokia 3510 > SE T230 > Nokia 6600 > HP2210 > SE p910i > SE p990i > N95 > I-mate 9502 > itouch > Nokia N900 > ? N9
My apps for N900:
Conversation Modder

My apps for N9:
LockScreenQuotes
USbS


If you feel I have helped you, don't forget to press Thanks!
 
ejasmudar's Avatar
Posts: 800 | Thanked: 957 times | Joined on Sep 2010 @ India
#9
To-Do
Remove the quotes from lock screen when uninstalled (now it still remains)
Put all configs into a config file for easy modifying
Option for basing colour on battery level or fixed colour
An item in settings to modify configs with GUI
Auto Start on boot

Anything I have missed?
__________________
My Device History:Nokia 3510 > SE T230 > Nokia 6600 > HP2210 > SE p910i > SE p990i > N95 > I-mate 9502 > itouch > Nokia N900 > ? N9
My apps for N900:
Conversation Modder

My apps for N9:
LockScreenQuotes
USbS


If you feel I have helped you, don't forget to press Thanks!
 
Posts: 188 | Thanked: 90 times | Joined on Sep 2006
#10
I think the first thing I tried is to install via file manager, not sure anymore though - messed about too much to remember...

BTW I like your todo list, looks good to me.
__________________
If I said something useful, please hit the 'Thanks!' link related to that post.
 

The Following User Says Thank You to aRTee For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 15:44.