You are not logged in.
Hi, I've finally finished setting up my tablet automatic screen rotation with acpid/acpi-support. The screen rotation works just fine, except when the display gets switched back to normal from tablet mode, DWM's status bar gets cut off. Is there anyway I can refresh the status bar after calling xrandr to prevent this?
Here is my rotate script:
#!/bin/sh
#
# This script rotates the display in TabletPCs when screen is changed from
# laptop to tablet mode, or when rotation button is pressed
test -f /usr/share/acpi-support/key-constants || exit 0
. /usr/share/acpi-support/power-funcs
ROTATION="$1" # this should be called "ROTATION_FROM"
case "$ROTATION" in
right)
NEW_ROTATION="normal"
NEW_WACOM="none"
;;
*)
NEW_ROTATION="right"
NEW_WACOM="cw"
;;
esac
/usr/bin/xrandr --output LVDS1 --rotate $NEW_ROTATION && echo $NEW_ROTATION > /var/lib/acpi-support/screen-rotation
# rotate the stylus
for type in "Serial Wacom Tablet eraser" "Serial Wacom Tablet stylus" ; do
/usr/bin/xsetwacom set "$type" rotate $NEW_WACOM
done
# rotate the arrow keys
case "$NEW_ROTATION" in
right)
xmodmap - <<END
keycode 114 = Up NoSymbol Up NoSymbol Up
keycode 111 = Left NoSymbol Left NoSymbol Left
keycode 116 = Right NoSymbol Right NoSymbol Right
keycode 113 = Down NoSymbol Down NoSymbol Down
END
;;
*)
xmodmap - <<END
keycode 111 = Up NoSymbol Up NoSymbol Up
keycode 113 = Left NoSymbol Left NoSymbol Left
keycode 114 = Right NoSymbol Right NoSymbol Right
keycode 116 = Down NoSymbol Down NoSymbol Down
END
;;
esac
Last edited by x402 (2010-08-24 17:45:24)
Offline
Hmmm, that's interesting. Maybe you should post it on the suckless ML.
Offline
Ah, just fixed it by adding --nograb to xrandr.
Offline