2024-02-08 18:08:35 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
doIt() {
|
2024-12-25 21:14:35 +01:00
|
|
|
if xrandr | grep 'HDMI-A-0' | grep disconnected >/dev/null; then
|
|
|
|
xrandr --output eDP --set TearFree "$1"
|
2024-02-08 18:08:35 +01:00
|
|
|
else
|
2024-12-25 21:14:35 +01:00
|
|
|
xrandr --output HDMI-A-0 --set TearFree "$1"
|
2024-02-08 18:08:35 +01:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
"on")
|
|
|
|
doIt "on"
|
|
|
|
;;
|
|
|
|
"off")
|
|
|
|
doIt "off"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "That option doesn't exist"
|
|
|
|
;;
|
|
|
|
esac
|