summaryrefslogtreecommitdiffstats
path: root/openembedded/packages/chkhinge26/files
diff options
context:
space:
mode:
authorMatthew Allum <mallum@openedhand.com>2005-10-03 17:33:10 +0000
committerMatthew Allum <mallum@openedhand.com>2005-10-03 17:33:10 +0000
commitc632d3effab6dd25825c57df70a005a2b8f8f42d (patch)
tree1c2d288a4dd58949c657d5e925a3471b7fdb615a /openembedded/packages/chkhinge26/files
parent96b751e6b740a5af338335110bc2f9c8eef11874 (diff)
downloadpoky-c632d3effab6dd25825c57df70a005a2b8f8f42d.tar.gz
added chkhinger26
git-svn-id: https://svn.o-hand.com/repos/poky@106 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages/chkhinge26/files')
-rwxr-xr-xopenembedded/packages/chkhinge26/files/hinge-handler33
1 files changed, 33 insertions, 0 deletions
diff --git a/openembedded/packages/chkhinge26/files/hinge-handler b/openembedded/packages/chkhinge26/files/hinge-handler
new file mode 100755
index 0000000000..12d0172e42
--- /dev/null
+++ b/openembedded/packages/chkhinge26/files/hinge-handler
@@ -0,0 +1,33 @@
1#!/bin/sh
2#
3# Quick handler for chkhinge26 and X.
4#
5
6export DISPLAY=:0
7
8if [ -z "$1" ]; then
9 echo "Usage: hinge-handler <state> ( 3 = closed, 0 = landscape, 2 = portrait )"
10 exit 1
11fi
12
13STATE=$1
14
15if [ $STATE = "3" ]; then
16 echo "sleeping"
17 apm -s
18 exit 0
19fi
20
21if [ $STATE = "0" ]; then
22 echo "lanscape"
23 killall mbinputmgr
24 xrand -o normal
25 exit 0
26fi
27
28if [ $STATE = "2" ]; then
29 echo "portrait"
30 mbinputmgr &
31 xrandr -o left
32 exit 0
33fi \ No newline at end of file