|
2012-04-18
, 17:29
|
Posts: 701 |
Thanked: 585 times |
Joined on Sep 2010
@ London, England
|
#12
|
|
2012-04-18
, 17:39
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#13
|
The Following 4 Users Say Thank You to qwazix For This Useful Post: | ||
|
2012-04-18
, 21:21
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#14
|
Optionally, this enables the touchscreen.
Code:echo 0 > /sys/devices/platform/omap2_mcspi.1/spi1.0/disable_ts
The Following User Says Thank You to qwazix For This Useful Post: | ||
|
2012-04-18
, 22:14
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#15
|
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 echo 0 > /sys/class/graphics/fb0/blank echo 2 > /sys/class/backlight/acx565akm/brightness d=`date '+%H:%M'` text2screen -t "$d" -s 10 -T 0xFFFFFF -B 0x000000 -x 50 -y 100 sleep 2 fi done
The Following 6 Users Say Thank You to qwazix For This Useful Post: | ||
|
2012-04-18
, 22:46
|
|
Posts: 2,473 |
Thanked: 12,265 times |
Joined on Oct 2009
@ Jerusalem, PS/IL
|
#16
|
I modified the script to mimic more the N9 behaviour and unlock with double click. So far I've been able to configure xbindkeys to detect double taps and run a script, to run xbindkeys when locked and kill it when unlocked, but when I do double tap on the "idle" screen nothing happens (xbindkeys does not notice any taps, I can see the verbose console output afterwards) does this happen because the screen is painted with the framebuffer? should xbindkeys register something? Of course I have included the above line in the script.
The Following 3 Users Say Thank You to MohammadAG For This Useful Post: | ||
|
2012-04-18
, 22:53
|
|
Posts: 1,918 |
Thanked: 3,118 times |
Joined on Oct 2010
@ My pants
|
#17
|
If you're not interested in the UI you can play a video in mplayer as well.
Code:mplayer -vo fbdev videofile
|
2012-04-18
, 22:58
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#18
|
Did you enable the touchscreen with my last command in the first post? The display can be on with the ts off.
The Following 2 Users Say Thank You to qwazix For This Useful Post: | ||
|
2012-04-19
, 22:46
|
|
Posts: 1,455 |
Thanked: 3,309 times |
Joined on Dec 2009
@ Rochester, NY
|
#19
|
Yes I did that, but still xbindkeys does not read anything. Also the script eats too much cpu so I'll have to make it work with dbus-scripts. Maybe a sleep of a couple of seconds before issuing the commands would help
#!/bin/sh 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}') time=`date '+%I:%M'` day=`date '+%m/%d/%y'` till=3600 if [ $LOCK == "locked" ] then echo "echo 0 > /sys/class/graphics/fb0/blank" | sudo gainroot >/dev/null #echo 2 > /sys/class/backlight/acx565akm/brightness text2screen -t "$time" -s 10 -T 0xFFFFFF -B 0x000000 -x 50 -y 100 text2screen -t "$day" -s 10 -T 0xFFFFFF -B 0x000000 -x -600 -y 350 till=30; fi if [ $2 == "QBW_DBUS_MONITOR" -o $till -gt 100 ] then id="/oh/no/more/qbw"$1 dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.set_param_uint32 string:'delayIndex' uint32:9 string:'' dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.set_param_uint32 string:'customIntervalSecs' uint32:$till string:'' dbus-send --session --type=method_call --dest=oh.no.more.qbw $id oh.no.more.qbw.reset_rearm_timer fi return 0
[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'
|
2012-04-20
, 09:34
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#20
|
The Following User Says Thank You to qwazix For This Useful Post: | ||
I know there are many things that should be improved like the commands that should not be in the loop because they are needed only once when the user locks the device (I tried hooking up to dbus-scripts lock event without success) but this is a first step. Also the backlight returns to 128 after unlocking and stays there whatever, but I haven't got around to that yet.
Script must be run as root. When you lock your device a dim time shows up just like on the N9 (with a huge pixelated font, but anyway)
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-18 at 17:41.