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 <noreply@anthropic.com>
main
Amir Alexander Abdelbaki 2026-05-23 10:23:22 +02:00
parent 3e78c7cb2a
commit 612c13b4c0
1 changed files with 10 additions and 0 deletions

View File

@ -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