fix: fix autorotate
This commit is contained in:
parent
d16051dada
commit
588684b25b
1 changed files with 27 additions and 22 deletions
|
@ -8,36 +8,41 @@ WAYLANDINPUT=("wacom-hid-52eb-finger"
|
||||||
"wacom-hid-52eb-pen")
|
"wacom-hid-52eb-pen")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function rotate_ms {
|
function rotate_ms {
|
||||||
case $1 in
|
if [[ $(hyprctl activewindow | grep Waydroid) == "" ]]; then
|
||||||
"normal")
|
case $1 in
|
||||||
rotate 0
|
"normal")
|
||||||
;;
|
rotate 0
|
||||||
"right-up")
|
;;
|
||||||
rotate 3
|
"right-up")
|
||||||
;;
|
rotate 3
|
||||||
"bottom-up")
|
;;
|
||||||
rotate 2
|
"bottom-up")
|
||||||
;;
|
rotate 2
|
||||||
"left-up")
|
;;
|
||||||
rotate 1
|
"left-up")
|
||||||
;;
|
rotate 1
|
||||||
esac
|
;;
|
||||||
|
esac
|
||||||
|
elif [[ $(hyprctl monitors | grep "transform: 0") == "" ]]; then
|
||||||
|
rotate 0
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function rotate {
|
function rotate {
|
||||||
TARGET_ORIENTATION=$1
|
TARGET_ORIENTATION=$1
|
||||||
|
|
||||||
echo "Rotating to" $TARGET_ORIENTATION
|
echo "Rotating to" $TARGET_ORIENTATION
|
||||||
|
|
||||||
hyprctl keyword monitor $SCREEN,transform,$TARGET_ORIENTATION
|
hyprctl keyword monitor $SCREEN,transform,$TARGET_ORIENTATION
|
||||||
|
|
||||||
for i in "${WAYLANDINPUT[@]}"
|
for i in "${WAYLANDINPUT[@]}"
|
||||||
do
|
do
|
||||||
hyprctl keyword device:"$i":transform $TARGET_ORIENTATION
|
hyprctl keyword device:"$i":transform $TARGET_ORIENTATION
|
||||||
done
|
done
|
||||||
|
|
||||||
/home/matt/.config/lisgd/config &
|
/home/matt/.config/lisgd/config &
|
||||||
}
|
}
|
||||||
|
|
||||||
while IFS='$\n' read -r line; do
|
while IFS='$\n' read -r line; do
|
||||||
|
|
Loading…
Reference in a new issue