View Single Post
woody14619's Avatar
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#19
Originally Posted by qwazix View Post
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
Have you considered using Queen Bee Widget with it? It has dbus monitoring, and can be set to do periodic updates. I don't know if they still get time updates when hildon is alseep, but may be worth a try. I'll give it a shot tonight and let you know how things work if I get a chance.

Edit:
In fact, yes... it does work.

I stripped the shell script to:
Code:
#!/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
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
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'

Last edited by woody14619; 2012-04-23 at 20:15. Reason: Fixed the busted parts. :)
 

The Following 6 Users Say Thank You to woody14619 For This Useful Post: