added screen rotation prototype
parent
ae4f2e31dc
commit
6d7fda0857
|
|
@ -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
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
Loading…
Reference in New Issue