diff --git a/desktopenvs/hyprland/scripts/screenrotationacw.sh.proto b/desktopenvs/hyprland/scripts/screenrotationacw.sh.proto new file mode 100755 index 0000000..ea1cf10 --- /dev/null +++ b/desktopenvs/hyprland/scripts/screenrotationacw.sh.proto @@ -0,0 +1,22 @@ +#!/bin/bash +curmon=$(hyprctl monitors | grep -B11 "focused: yes" | head -n1 | awk '{print $2}') +currot=$(hyprctl monitors | grep -B1 "focused: yes" | head -n1 | awk '{print $2}') +touchdev=$(hyprctl devices | grep -A1 "Touch Device" | tail -n1 | xargs) + +newrot="" +if [ $currot == "3" ]; then + newrot="0" +else + newrot=$(($currot + 1)) +fi +echo $newrot + +hyprctl keyword monitor $curmon,preferred,auto,1,transform,$newrot + +eww reload + +if [ "$touchdev" != '' ]; then + hyprctl keyword device:$touchdev:transform $newrot +fi + + diff --git a/desktopenvs/hyprland/scripts/screenrotationwcw.sh.proto b/desktopenvs/hyprland/scripts/screenrotationwcw.sh.proto new file mode 100755 index 0000000..ac3f6a6 --- /dev/null +++ b/desktopenvs/hyprland/scripts/screenrotationwcw.sh.proto @@ -0,0 +1,21 @@ +#!/bin/bash +curmon=$(hyprctl monitors | grep -B11 "focused: yes" | head -n1 | awk '{print $2}') +currot=$(hyprctl monitors | grep -B1 "focused: yes" | head -n1 | awk '{print $2}') +touchdev=$(hyprctl devices | grep -A1 "Touch Device" | tail -n1 | xargs) + +newrot="" +if [ $currot == "3" ]; then + newrot="0" +else + newrot=$(($currot - 1)) +fi +echo $newrot + + +hyprctl keyword monitor $curmon,preferred,auto,1,transform,$newrot + +eww reload + +if [ "$touchdev" != '' ]; then + hyprctl keyword device:$touchdev:transform $newrot +fi