diff options
Diffstat (limited to 'openembedded/packages/chkhinge26/files/hinge-handler')
-rwxr-xr-x | openembedded/packages/chkhinge26/files/hinge-handler | 19 |
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 | ||
6 | killproc() { # 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 | |||
6 | export DISPLAY=:0 | 14 | export DISPLAY=:0 |
7 | 15 | ||
8 | if [ -z "$1" ]; then | 16 | if [ -z "$1" ]; then |
@@ -20,10 +28,10 @@ fi | |||
20 | 28 | ||
21 | if [ $STATE = "0" ]; then | 29 | if [ $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 |
29 | fi | 37 | fi |
@@ -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 |
38 | fi \ No newline at end of file | 46 | fi |
47 | |||