From 612c13b4c0420e729e37e02037c22f928df14d82 Mon Sep 17 00:00:00 2001 From: The_miro Date: Sat, 23 May 2026 10:23:22 +0200 Subject: [PATCH] fix(rotate): add pen/stylus rotation with explicit output mapping Tablet devices require output= in hl.device() for transform to take effect, unlike touchscreens which auto-bind to their display. Co-Authored-By: Claude Sonnet 4.6 --- desktopenvs/hyprlua/scripts/unified-rotate.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/desktopenvs/hyprlua/scripts/unified-rotate.sh b/desktopenvs/hyprlua/scripts/unified-rotate.sh index 7c44b11..f1f0b4d 100755 --- a/desktopenvs/hyprlua/scripts/unified-rotate.sh +++ b/desktopenvs/hyprlua/scripts/unified-rotate.sh @@ -54,5 +54,15 @@ else echo "No touchscreen device detected." fi +# Detect pen/tablet device name +pendev=$(hyprctl devices -j | jq -r '.tablets[0].name // empty') + +if [[ -n "$pendev" ]]; then + echo "Applying same rotation to pen/tablet: $pendev" + hyprctl eval "hl.device({name='$pendev', transform=$newrot, output='$curmon'})" +else + echo "No pen/tablet device detected." +fi + # Reload Eww to adjust bar size eww reload