fix: fix autorotate

This commit is contained in:
matt1432 2023-06-27 00:23:22 +02:00
parent d16051dada
commit 588684b25b

View file

@ -8,36 +8,41 @@ WAYLANDINPUT=("wacom-hid-52eb-finger"
"wacom-hid-52eb-pen")
function rotate_ms {
case $1 in
"normal")
rotate 0
;;
"right-up")
rotate 3
;;
"bottom-up")
rotate 2
;;
"left-up")
rotate 1
;;
esac
if [[ $(hyprctl activewindow | grep Waydroid) == "" ]]; then
case $1 in
"normal")
rotate 0
;;
"right-up")
rotate 3
;;
"bottom-up")
rotate 2
;;
"left-up")
rotate 1
;;
esac
elif [[ $(hyprctl monitors | grep "transform: 0") == "" ]]; then
rotate 0
fi
}
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[@]}"
do
hyprctl keyword device:"$i":transform $TARGET_ORIENTATION
done
for i in "${WAYLANDINPUT[@]}"
do
hyprctl keyword device:"$i":transform $TARGET_ORIENTATION
done
/home/matt/.config/lisgd/config &
/home/matt/.config/lisgd/config &
}
while IFS='$\n' read -r line; do