summaryrefslogtreecommitdiff
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
parent96b751e6b740a5af338335110bc2f9c8eef11874 (diff)
downloadopenembedded-core-c632d3effab6dd25825c57df70a005a2b8f8f42d.tar.gz
openembedded-core-c632d3effab6dd25825c57df70a005a2b8f8f42d.tar.bz2
openembedded-core-c632d3effab6dd25825c57df70a005a2b8f8f42d.tar.xz
openembedded-core-c632d3effab6dd25825c57df70a005a2b8f8f42d.zip
added chkhinger26
git-svn-id: https://svn.o-hand.com/repos/poky@106 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rwxr-xr-xopenembedded/packages/chkhinge26/chkhinge26_0.0.bb18
-rwxr-xr-xopenembedded/packages/chkhinge26/files/hinge-handler33
2 files changed, 51 insertions, 0 deletions
diff --git a/openembedded/packages/chkhinge26/chkhinge26_0.0.bb b/openembedded/packages/chkhinge26/chkhinge26_0.0.bb
new file mode 100755
index 000000000..da7eedf58
--- /dev/null
+++ b/openembedded/packages/chkhinge26/chkhinge26_0.0.bb
@@ -0,0 +1,18 @@
+LICENSE = "LGPL"
+SECTION = "x11"
+#DEPENDS = "glib-2.0 gtk+ libglade eds-dbus"
+MAINTAINER = "Matthew Allum <mallum@openedhand.com>"
+DESCRIPTION = "Chkhinge26 fires off cmds on cXXXX Zs."
+PR = "r0"
+
+SRC_URI = "http://butterfeet.org/misc/${PN}-${PV}.tar.gz \
+ file://hinge-handler"
+
+inherit autotools pkgconfig
+
+do_install_append () {
+ install -m 0755 ${WORKDIR}/hinge-handler ${D}/${BINDIR}/
+}
+
+FILES_${PN} += "${BINDIR}/hinge-handler"
+
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 <state> ( 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