From a86036ebfdb2cbce460ab24eb78ad6a6690f5bb2 Mon Sep 17 00:00:00 2001 From: Adam Gausmann Date: Tue, 29 Jul 2025 11:00:31 -0500 Subject: [PATCH] also try wlopm when `niri msg` does not work, even if socket envvar exists --- templates/bin/jdisplays | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/templates/bin/jdisplays b/templates/bin/jdisplays index 0ea12b0..b380f26 100755 --- a/templates/bin/jdisplays +++ b/templates/bin/jdisplays @@ -6,9 +6,5 @@ case "$1" in *) exit 1 ;; esac -if [ -e "$NIRI_SOCKET" ] -then - niri msg action power-$onoff-monitors -else - wlopm --$onoff '*' -fi +[ -e "$NIRI_SOCKET" ] && niri msg action power-$onoff-monitors \ + || wlopm --$onoff '*'