You are not logged in.

#1 2010-08-24 06:23:42

x402
Member
Registered: 2008-01-06
Posts: 6

(SOLVED) DWM status bar disappears after screen rotation on tablet

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

#2 2010-08-24 10:42:56

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: (SOLVED) DWM status bar disappears after screen rotation on tablet

Hmmm, that's interesting. Maybe you should post it on the suckless ML.

Offline

#3 2010-08-24 17:44:12

x402
Member
Registered: 2008-01-06
Posts: 6

Re: (SOLVED) DWM status bar disappears after screen rotation on tablet

Ah, just fixed it by adding --nograb to xrandr.

Offline

Board footer

Powered by FluxBB