add detection if screen already rotate or not
This commit is contained in:
parent
04dba36259
commit
49572788f9
1 changed files with 19 additions and 9 deletions
|
@ -1,11 +1,21 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
transform_value=$(hyprctl getoption device:wacom-hid-526b-finger:transform | sed '2!d' | cut -d ":" -f 2)
|
||||
|
||||
|
||||
if [ "${transform_value}" == " 0" ]
|
||||
then
|
||||
echo ${transform_value}
|
||||
hyprctl keyword monitor eDP-1,preferred,auto,1.2,transform,1
|
||||
hyprctl keyword device:wacom-hid-526b-pen:transform 1
|
||||
hyprctl keyword device:wacom-hid-526b-finger:transform 1
|
||||
hyprctl keyword device:wacom-hid-526b-finger-1:transform 1
|
||||
|
||||
sleep 10
|
||||
|
||||
else
|
||||
echo ${transform_value}
|
||||
hyprctl keyword device:wacom-hid-526b-pen:transform 0
|
||||
hyprctl keyword device:wacom-hid-526b-finger:transform 0
|
||||
hyprctl keyword device:wacom-hid-526b-finger-1:transform 0
|
||||
hyprctl keyword monitor eDP-1,preferred,auto,1.2,transform,0
|
||||
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue