From 8b10c99a09b6502eb7569694bc262bcf5b8dba1e Mon Sep 17 00:00:00 2001 From: Willow Barraco Date: Wed, 28 Jun 2023 20:14:11 +0200 Subject: [PATCH] sxmo_wm.sh: fix dpms switch when outputs are partially turned off In a situation of one output was already turned off manualy by the user, the script was not turning off other outputs. Reversing this check produce a more consistent behavior. Signed-off-by: Willow Barraco Signed-off-by: Anjandev Momi --- scripts/core/sxmo_wm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/core/sxmo_wm.sh b/scripts/core/sxmo_wm.sh index e35eba3..a90a181 100755 --- a/scripts/core/sxmo_wm.sh +++ b/scripts/core/sxmo_wm.sh @@ -25,9 +25,9 @@ xorgdpms() { swaydpms() { STATE=off - if swaymsg -t get_outputs \ + if ! swaymsg -t get_outputs \ | jq ".[] | .dpms" \ - | grep -q "false"; then + | grep -q "true"; then STATE=on fi