From f7b659fdd9d5cd3358def4fd6e9ffe38fad2766a Mon Sep 17 00:00:00 2001 From: CronyAkatsuki Date: Thu, 8 Feb 2024 18:08:35 +0100 Subject: [PATCH] Lets go --- toggle-xrandr | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 toggle-xrandr diff --git a/toggle-xrandr b/toggle-xrandr new file mode 100755 index 0000000..dc4f7b5 --- /dev/null +++ b/toggle-xrandr @@ -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