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