This commit is contained in:
CronyAkatsuki 2024-02-08 18:08:35 +01:00
parent 8425d4b953
commit f7b659fdd9

21
toggle-xrandr Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
doIt() {
if xrandr | grep 'HDMI-A-0' | grep connected >/dev/null; then
xrandr --output HDMI-A-0 --set TearFree "$1"
else
xrandr --output eDP --set TearFree "on"
fi
}
case "$1" in
"on")
doIt "on"
;;
"off")
doIt "off"
;;
*)
echo "That option doesn't exist"
;;
esac