View Single Post
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#15
new version not playing any sound when lock-switch is held while sliding kbd open:

Code:
#!/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
for the screen locking on closing kbd slider you may want to add the "else" lines from above


I'm planning to change lock-switch hold to not immediately unlock screen, but instead slowly ramp up screen brightness from zero until you release the switch. Also on long "press" of lock-switch activate profile: silent.

Usecase: e.g. in cinema you want to "unlock" smoothly to a somewhat more discreet operation mode - so you press&hold the lockswitch, slide open kbd (no sound thanks to above little tweak), and watch the screen come up slowly in brightness until you just see enough and release the lock-switch.
Well, this is maybe just a bit OT in this thread, but anyway.

/j
__________________
Maemo Community Council member [2012-10, 2013-05, 2013-11, 2014-06 terms]
Hildon Foundation Council inaugural member.
MCe.V. foundation member

EX Hildon Foundation approved
Maemo Administration Coordinator (stepped down due to bullying 2014-04-05)
aka "techstaff" - the guys who keep your infra running - Devotion to Duty http://xkcd.com/705/

IRC(freenode): DocScrutinizer*
First USB hostmode fanatic, father of H-E-N

Last edited by joerg_rw; 2010-12-19 at 21:31.
 

The Following 2 Users Say Thank You to joerg_rw For This Useful Post: