diff options
| author | Gibheer <gibheer+git@zero-knowledge.org> | 2026-05-16 23:05:49 +0200 |
|---|---|---|
| committer | Gibheer <gibheer+git@zero-knowledge.org> | 2026-05-16 23:05:49 +0200 |
| commit | e26e3908e761c7a888b9afbf3917ffc6b6b2401b (patch) | |
| tree | 1bd223ef8f64aab201e4a38bd2c85dd9ecbb3a9f /bin | |
| parent | 5038b56859eb3375a81207ff0a1ac7edb9a0ca0d (diff) | |
automate detecting which monitor to disable
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/monitor | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/monitor b/bin/monitor index 0e69f60..481a918 100755 --- a/bin/monitor +++ b/bin/monitor @@ -3,8 +3,11 @@ if [ -z "$1" ]; then exit 1 fi +monitor="$(hyprctl monitors all | awk '/Monitor/ { if ($2 != "eDP-1") { print $2 } }')" + if [ "$1" -eq "0" ]; then - hyprctl keyword monitor DP-1,disable + hyprctl keyword monitor $monitor,disable else - hyprctl keyword monitor DP-1,preferred,auto-left,1 + #hyprctl keyword monitor $monitor,preferred,auto-left,1 + hyprctl keyword monitor $monitor,preferred,auto-left,1 fi |
