From 3d784b81c471b366f9f8d1d69032f537d80230b9 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 12 Nov 2024 06:52:21 +0100 Subject: [PATCH] ws --- bash/gsettings.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/bash/gsettings.sh b/bash/gsettings.sh index e7e6a9d..1b4a08b 100644 --- a/bash/gsettings.sh +++ b/bash/gsettings.sh @@ -1,12 +1,9 @@ ws() { - local boolean="${1}" - if [ "${boolean}" = "1" ]; then - boolean="true" - else - boolean="false" - fi - gsettings set \ - "org.gnome.mutter" \ - "workspaces-only-on-primary" \ - "${boolean}" + local bool + local group="org.gnome.mutter" + local var="workspaces-only-on-primary" + bool="$(gsettings get "${group}" "${var}")" + bool="$(not "${bool}")" + gsettings set "${group}" "${var}" "${bool}" + log_info "${group}/${var}: ${bool}" }