Dotfiles/desktopenvs/hyprlua/scripts/deprecated/screenrotationwcw.sh.old

16 lines
362 B
Bash
Executable File

#!/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}')
newrot=""
if [ $currot == "0" ]; then
newrot="3"
else
newrot=$(($currot - 1))
fi
echo $newrot
hyprctl keyword monitor $curmon,preferred,auto,1,transform,$newrot
eww reload