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")
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue