From c632d3effab6dd25825c57df70a005a2b8f8f42d Mon Sep 17 00:00:00 2001 From: Matthew Allum Date: Mon, 3 Oct 2005 17:33:10 +0000 Subject: added chkhinger26 git-svn-id: https://svn.o-hand.com/repos/poky@106 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- .../packages/chkhinge26/files/hinge-handler | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 openembedded/packages/chkhinge26/files/hinge-handler (limited to 'openembedded/packages/chkhinge26/files') diff --git a/openembedded/packages/chkhinge26/files/hinge-handler b/openembedded/packages/chkhinge26/files/hinge-handler new file mode 100755 index 000000000..12d0172e4 --- /dev/null +++ b/openembedded/packages/chkhinge26/files/hinge-handler @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Quick handler for chkhinge26 and X. +# + +export DISPLAY=:0 + +if [ -z "$1" ]; then + echo "Usage: hinge-handler ( 3 = closed, 0 = landscape, 2 = portrait )" + exit 1 +fi + +STATE=$1 + +if [ $STATE = "3" ]; then + echo "sleeping" + apm -s + exit 0 +fi + +if [ $STATE = "0" ]; then + echo "lanscape" + killall mbinputmgr + xrand -o normal + exit 0 +fi + +if [ $STATE = "2" ]; then + echo "portrait" + mbinputmgr & + xrandr -o left + exit 0 +fi \ No newline at end of file -- cgit v1.2.3