diff options
author | Matthew Allum <mallum@openedhand.com> | 2005-10-03 17:33:10 +0000 |
---|---|---|
committer | Matthew Allum <mallum@openedhand.com> | 2005-10-03 17:33:10 +0000 |
commit | c632d3effab6dd25825c57df70a005a2b8f8f42d (patch) | |
tree | 1c2d288a4dd58949c657d5e925a3471b7fdb615a | |
parent | 96b751e6b740a5af338335110bc2f9c8eef11874 (diff) | |
download | poky-c632d3effab6dd25825c57df70a005a2b8f8f42d.tar.gz |
added chkhinger26
git-svn-id: https://svn.o-hand.com/repos/poky@106 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rwxr-xr-x | openembedded/packages/chkhinge26/chkhinge26_0.0.bb | 18 | ||||
-rwxr-xr-x | openembedded/packages/chkhinge26/files/hinge-handler | 33 |
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 0000000000..da7eedf584 --- /dev/null +++ b/openembedded/packages/chkhinge26/chkhinge26_0.0.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | LICENSE = "LGPL" | ||
2 | SECTION = "x11" | ||
3 | #DEPENDS = "glib-2.0 gtk+ libglade eds-dbus" | ||
4 | MAINTAINER = "Matthew Allum <mallum@openedhand.com>" | ||
5 | DESCRIPTION = "Chkhinge26 fires off cmds on cXXXX Zs." | ||
6 | PR = "r0" | ||
7 | |||
8 | SRC_URI = "http://butterfeet.org/misc/${PN}-${PV}.tar.gz \ | ||
9 | file://hinge-handler" | ||
10 | |||
11 | inherit autotools pkgconfig | ||
12 | |||
13 | do_install_append () { | ||
14 | install -m 0755 ${WORKDIR}/hinge-handler ${D}/${BINDIR}/ | ||
15 | } | ||
16 | |||
17 | FILES_${PN} += "${BINDIR}/hinge-handler" | ||
18 | |||
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 | |||
6 | export DISPLAY=:0 | ||
7 | |||
8 | if [ -z "$1" ]; then | ||
9 | echo "Usage: hinge-handler <state> ( 3 = closed, 0 = landscape, 2 = portrait )" | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | STATE=$1 | ||
14 | |||
15 | if [ $STATE = "3" ]; then | ||
16 | echo "sleeping" | ||
17 | apm -s | ||
18 | exit 0 | ||
19 | fi | ||
20 | |||
21 | if [ $STATE = "0" ]; then | ||
22 | echo "lanscape" | ||
23 | killall mbinputmgr | ||
24 | xrand -o normal | ||
25 | exit 0 | ||
26 | fi | ||
27 | |||
28 | if [ $STATE = "2" ]; then | ||
29 | echo "portrait" | ||
30 | mbinputmgr & | ||
31 | xrandr -o left | ||
32 | exit 0 | ||
33 | fi \ No newline at end of file | ||