mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
590 B
Executable File
590 B
Executable File
#!/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
urg mbinputmgr should kill below
killall matchbox-keyboard killall matchbox-stroke xrandr -o normal exit 0 fi
if [ $STATE = "2" ]; then echo "portrait" xrandr -o left
just to be extra safe
sleep 1 mbinputmgr & exit 0 fi