summaryrefslogtreecommitdiffstats
path: root/openembedded/packages/chkhinge26/files/hinge-handler
diff options
context:
space:
mode:
Diffstat (limited to 'openembedded/packages/chkhinge26/files/hinge-handler')
-rwxr-xr-xopenembedded/packages/chkhinge26/files/hinge-handler19
1 files changed, 14 insertions, 5 deletions
diff --git a/openembedded/packages/chkhinge26/files/hinge-handler b/openembedded/packages/chkhinge26/files/hinge-handler
index d8100e9b2e..5d5f62e305 100755
--- a/openembedded/packages/chkhinge26/files/hinge-handler
+++ b/openembedded/packages/chkhinge26/files/hinge-handler
@@ -3,6 +3,14 @@
3# Quick handler for chkhinge26 and X. 3# Quick handler for chkhinge26 and X.
4# 4#
5 5
6killproc() { # kill the named process(es)
7 pid=`/bin/ps -e x |
8 /bin/grep $1 |
9 /bin/grep -v grep |
10 /bin/sed -e 's/^ *//' -e 's/ .*//'`
11 [ "$pid" != "" ] && kill $pid
12}
13
6export DISPLAY=:0 14export DISPLAY=:0
7 15
8if [ -z "$1" ]; then 16if [ -z "$1" ]; then
@@ -20,10 +28,10 @@ fi
20 28
21if [ $STATE = "0" ]; then 29if [ $STATE = "0" ]; then
22 echo "lanscape" 30 echo "lanscape"
23 killall mbinputmgr 31 killproc /usr/bin/mbinputmgr
24# urg mbinputmgr should kill below 32# urg mbinputmgr should kill below
25 killall matchbox-keyboard 33 killproc /usr/bin/matchbox-keyboard
26 killall matchbox-stroke 34 killproc /usr/bin/matchbox-stroke
27 xrandr -o normal 35 xrandr -o normal
28 exit 0 36 exit 0
29fi 37fi
@@ -33,6 +41,7 @@ if [ $STATE = "2" ]; then
33 xrandr -o left 41 xrandr -o left
34# just to be extra safe 42# just to be extra safe
35 sleep 1 43 sleep 1
36 mbinputmgr & 44 /usr/bin/mbinputmgr &
37 exit 0 45 exit 0
38fi \ No newline at end of file 46fi
47