Reply
Thread Tools
woody14619's Avatar
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#21
Originally Posted by qwazix View Post
Another idea is to build images with imagemagick and have them displayed on the framebuffer with mplayer, so that icons, better fonts etc are possible. I'll look into it probably in the weekend

If you'd like a sample of how do to that, check out the scripts Alfred & I worked on. We used imagemagik for changing the lock screen to include weather and such. (I still use this as well.)

Currently I've having an issue with the QBW script, in that after a while QBW stops calling the script on close events. I updated the script to change it's timeout via dbus, which seems to be semi-broken and is probably the cause of it breaking after 10 or so hours of use.

If I get that stable, I'll post the widget and script again. I may eventually bite the bullet and see about creating an honest app out of it in C, since it seems like a good/small project to get into the devel stuff with, which I've been wanting to do for a while (and may actually have some time for in the near future.)
 

The Following 6 Users Say Thank You to woody14619 For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#22
Hey, if we want to have something displayed all the time on locked screen without sucking battery too much, script chains using mplayer to draw imagemagick isn't good way of progress

For any sensible thing that *may* be viewed without backlight, black big letters on white background (or the opposite) seems to be "top high" of what You're aiming for.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following User Says Thank You to Estel For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#23
I had success with dbus-scripts. This script shows the time if connected to the locked device event

Code:
#!/bin/sh
echo 0 > /sys/class/graphics/fb0/blank
echo 2 > /sys/class/backlight/acx565akm/brightness
text2screen -c -B 0x000000
while true
do
    LOCK=$(dbus-send --system --type=method_call --dest="com.nokia.mce" --print-reply "/com/nokia/mce/request" com.nokia.mce.request.get_tklock_mode|awk -F "\"" '/g/ {print $2}')
    if [ $LOCK != "locked" ] 
    then break; fi
    d=`date '+%H:%M'`
    text2screen -t "$d" -s 19 -T 0xFFFFFF -B 0x000000 -x 35 -y 0 
    sleep 60
done
Now the loop runs only once in 60 seconds and only when device is idle

this is the dbus-scripts control file

Code:
/home/user/dbusIdle.sh * * com.nokia.mce.signal tklock_mode_ind locked
now I have to find a way to kill it on unlock. killall simpleIdle.sh in a script hooked to the unlock event doesn't work. Of course if you don't lock your phone for 60 seconds it will die anyway.

edit: insterted a line that clears the screen to black because browser in fullsceen is probably writing directly to the framebuffer, and the time appears over the last screen viewed before lock

edit: we also got to force redraw of the screen upon unlock because some apps (tweego, probably all full screen qt -qml?- apps) do not redraw continuously.
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob

Last edited by qwazix; 2012-04-20 at 22:11.
 

The Following 5 Users Say Thank You to qwazix For This Useful Post:
woody14619's Avatar
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#24
I've update the QBW version of the script so it now sets up QBW to handle all the triggering. It's been working stable on my device all day, which is really nice.

Thanks for this great idea, and the major pointers on what to touch,etc. That's to everyone involved!

I may still yet make an actual app that ties in a little nicer (looks at other dbus signals, like power, slider, etc) and doesn't rely on scripting and widgets to get it's job done. (And, just because I want to.)
 

The Following 8 Users Say Thank You to woody14619 For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#25
backlight is probably a no-go, my battery emptied from about 80% during the night with backlight on 2. But the time is still visible without backlight so we are still good. (Maybe there is a way to have even less backlight than 2? On the 770 somebody managed to go below the lowest setting)

Please somebody more knowledgeable tell me how to kill the script when device unlocked. Can I pass a parameter to a running script? Why the heck killall myscipt.sh doesn't work when called from dbus scripts but works when called from xterm?
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla –– contactlaunch –– timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 

The Following 3 Users Say Thank You to qwazix For This Useful Post:
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#26
Originally Posted by qwazix View Post
edit: we also got to force redraw of the screen upon unlock because some apps (tweego, probably all full screen qt -qml?- apps) do not redraw continuously.
Non-composited windows, basically, most if not all fullscreen windows (you can also disable desktop composition on any window with CTRL+SHIFT+n), there's an atom on the windows that aren't composited, you can check that with standard X tools (xwininfo?)
 

The Following 3 Users Say Thank You to MohammadAG For This Useful Post:
Posts: 539 | Thanked: 518 times | Joined on May 2010 @ nanaurbusiness
#27
Originally Posted by woody14619 View Post
The QBW widget I setup is here:

Code:
[queen-beecon-header]
version=1.000000
checksum=3330600
[queen-beecon-exported-instance]
widgetType=0
widgetVisible=0
operationalStatus=0
hideCanvas=true
hideClickCanvas=true
snippetBgRGB=0
snippetExtBgRGB=#000000000000
beecon_lt0_ImgZoom=0
beecon_lt0_BgRGB=2
beecon_lt0_ExtBgRGB=#808080808080
beecon_lt0_ImgFilename=queen-beecon-syserr.png
beecon_eq0_ImgZoom=0
beecon_eq0_BgRGB=3
beecon_eq0_ExtBgRGB=#0000ffff0000
beecon_eq0_ImgFilename=queen-beecon-appok.png
beecon_eq1_ImgZoom=0
beecon_eq1_BgRGB=4
beecon_eq1_ExtBgRGB=#ffffffff0000
beecon_eq1_ImgFilename=queen-beecon-appwrn.png
Nokia-N900-42-11:~/scripts# more scrclock.beecon
[queen-beecon-header]
version=1.000000
checksum=3330600
[queen-beecon-exported-instance]
widgetType=0
widgetVisible=0
operationalStatus=0
hideCanvas=true
hideClickCanvas=true
snippetBgRGB=0
snippetExtBgRGB=#000000000000
beecon_lt0_ImgZoom=0
beecon_lt0_BgRGB=2
beecon_lt0_ExtBgRGB=#808080808080
beecon_lt0_ImgFilename=queen-beecon-syserr.png
beecon_eq0_ImgZoom=0
beecon_eq0_BgRGB=3
beecon_eq0_ExtBgRGB=#0000ffff0000
beecon_eq0_ImgFilename=queen-beecon-appok.png
beecon_eq1_ImgZoom=0
beecon_eq1_BgRGB=4
beecon_eq1_ExtBgRGB=#ffffffff0000
beecon_eq1_ImgFilename=queen-beecon-appwrn.png
beecon_ge2_ImgZoom=0
beecon_ge2_BgRGB=5
beecon_ge2_ExtBgRGB=#ffff00000000
beecon_ge2_ImgFilename=queen-beecon-apperr.png
beecon_idxge2_ImgZoom=0
beecon_idxge2_BgRGB=11
beecon_idxge2_ExtBgRGB=#0000ffffffff
beecon_idxge2_ImgFilename=queen-beecon-index.png
widWidth=64.509316770186331
widHeight=64.551083591331263
instanceTitle=screen-time
instanceCmd=/root/scripts/scrlockclock.sh
rememberMe=
cmdImgFilename=queen-beecon.png
cmdImgAngle=0
cmdImgZoom=0
cmdFgRGB=1
cmdExtFgRGB=#ffffffffffff
cmdTextAngle=0
cmdVisibilityPosition=2
cmdImgVisibilityPosition=5
cmdJustify=0
cmdExtFont=Nokia Sans bold italic 12
cmdFontName=3
cmdFontSize=12
resImgFilename=queen-beecon-resimg.png
resImgAngle=0
resImgZoom=0
resFgRGB=1
resExtFgRGB=#ffffffffffff
resTextAngle=0
resVisibilityPosition=8
resImgVisibilityPosition=3
resJustify=0
resExtFont=Nokia Sans Cn  10
resFontName=16
resFontSize=10
resWrapLongLines=false
progressAnimationFrames=4
progressAnimationTimer=4
progressAnimationPos=4
progressAnimationAtClickXY=false
progressAnimationBasename=queen-beecon-progress
updOnStartup=false
updOnClick=false
multiClick=false
updOnDesktop=false
updOnSight=false
updOnOrientation=false
delayIndex=1
customIntervalSecs=0
updNeworkPolicy=0
GPSsettings=0
updOnDBUS=1
updOnDBUSBus=0
updOnDBUSMatchRule=type='signal',path='/com/nokia/mce/signal',interface='com.nokia.mce.signal',member='tklock_mode_ind'
Why there are two [queen-beecon-header] parts in your code? Is that a mistake?
Also this command 'Nokia-N900-42-11:~/scripts# more scrclock.beecon' seems to be strange...

Edit: Ok got it. I removed the blue part and qbw got imported successfully.

Regards,

J4ZZ

Last edited by J4ZZ; 2012-04-23 at 12:52.
 

The Following 4 Users Say Thank You to J4ZZ For This Useful Post:
woody14619's Avatar
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#28
Originally Posted by J4ZZ View Post
Why there are two [queen-beecon-header] parts in your code? Is that a mistake?
Also this command 'Nokia-N900-42-11:~/scripts# more scrclock.beecon' seems to be strange...

Edit: Ok got it. I removed the blue part and qbw got imported successfully.

Regards,

J4ZZ
Thanks for the find. I've fixed it in the original post.

I'm still having an issue that after about 20 hours or so QBW stops sending messages or calling the script all together. :P So looks like that's not working. I'll be looking at coding up an nice background app for this soon.
 

The Following 4 Users Say Thank You to woody14619 For This Useful Post:
Posts: 34 | Thanked: 13 times | Joined on Aug 2007 @ Bulgaria - Vidin
#29
For completely disabling the backlight

(turn off)
# echo 1 > /sys/class/backlight/acx565akm/bl_power

(turn on)
# echo 0 > /sys/class/backlight/acx565akm/bl_power


Is it possible to make a qbw to detect double click and unlock?
 

The Following 2 Users Say Thank You to apple2 For This Useful Post:
woody14619's Avatar
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#30
Originally Posted by apple2 View Post
Is it possible to make a qbw to detect double click and unlock?
It is, and I did earlier in the thread. The problem is that after a while QBW stops responding to dbus signals entirely.
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:13.