The Following 3 Users Say Thank You to MohammadAG For This Useful Post: | ||
|
2010-12-15
, 16:05
|
|
Posts: 466 |
Thanked: 180 times |
Joined on Feb 2010
|
#12
|
|
2010-12-15
, 16:10
|
Posts: 7 |
Thanked: 0 times |
Joined on Dec 2010
|
#13
|
|
2010-12-15
, 16:24
|
|
Posts: 2,222 |
Thanked: 12,651 times |
Joined on Mar 2010
@ SOL 3
|
#14
|
apt-get install dbus-scripts
#:soundonslide /etc/dbus-scripts-scripts/playswoosh * * org.freedesktop.Hal.Device Condition ButtonPressed cover
#!/bin/sh stored=/home/user/.slidestore; slide=$(cat sys/devices/platform/gpio-switch/slide/state); if [ X$slide == X$(cat $stored) ]; then exit 0; fi; if [ X$slide == Xopen ]; then /usr/bin/play-sound /usr/share/sounds/ui-charging_started.wav; ##next two lines are new and untested :-) and relevant for locking the screen else /usr/bin/dbus-send --system --type=method_call \ --dest=com.nokia.mce /com/nokia/mce/request \ com.nokia.mce.request.req_tklock_mode_change string:"locked" fi; echo -n $slide >$stored
#!/bin/sh stored=/home/user/.slidestore; slide=$(cat sys/devices/platform/gpio-switch/slide/state); if [ X$slide == X$(cat $stored) ]; then exit 0; fi; if [ X$slide != Xopen ]; then /usr/bin/dbus-send --system --type=method_call \ --dest=com.nokia.mce /com/nokia/mce/request \ com.nokia.mce.request.req_tklock_mode_change string:"locked" fi; echo -n $slide >$stored
The Following 4 Users Say Thank You to joerg_rw For This Useful Post: | ||
|
2010-12-19
, 20:45
|
|
Posts: 2,222 |
Thanked: 12,651 times |
Joined on Mar 2010
@ SOL 3
|
#15
|
#!/bin/sh # file: /etc/dbus-scripts-scripts/playswoosh # chmod +x stored=/tmp/slidestore; slide=$(cat sys/devices/platform/gpio-switch/slide/state); if [ X$slide == X$(cat $stored) ]; then exit 0; fi; if [ $slide == open -a $(cat /sys/devices/platform/gpio-switch/kb_lock/state) == open ]; then /usr/bin/play-sound /usr/share/sounds/ui-charging_started.wav; fi; echo -n $slide >$stored
If anyone's interested in it, I can package it up quickly and upload it to devel.