From d6bde9b2b4b74a0c776f578f1e929aa0d1f45ff0 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Wed, 5 Jun 2024 12:55:31 +0100 Subject: [PATCH] Fix string comparison --- roles/home-gui/files/gnome-setup.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/home-gui/files/gnome-setup.sh b/roles/home-gui/files/gnome-setup.sh index 5e8f6a9..8814de2 100644 --- a/roles/home-gui/files/gnome-setup.sh +++ b/roles/home-gui/files/gnome-setup.sh @@ -1,7 +1,7 @@ #!/bin/sh # Leave commented for light mode, or uncomment for dark mode. -_acp_dark_mode=1 +#_acp_dark_mode=1 test -x /usr/bin/gsettings || (echo "gsettings not found" && exit 1) @@ -60,7 +60,7 @@ set_nautilus_preferences set_gnome_terminal_preferences () { gsettings set org.gnome.Terminal.Legacy.Settings menu-accelerator-enabled false gsettings set org.gnome.Terminal.Legacy.Settings shortcuts-enabled false - if [ -n $_acp_dark_mode ] + if [ -n "$_acp_dark_mode" ] then gsettings set org.gnome.Terminal.Legacy.Settings theme-variant 'dark' else @@ -77,7 +77,7 @@ set_gnome_terminal_preferences () { ]" gsettings set "$_acp_terminal_profile" preserve-working-directory 'always' gsettings set "$_acp_terminal_profile" use-theme-colors false - if [ -n $_acp_dark_mode ] + if [ -n "$_acp_dark_mode" ] then gsettings set "$_acp_terminal_profile" background-color '#101010' gsettings set "$_acp_terminal_profile" foreground-color '#C0C0C0' @@ -161,7 +161,7 @@ set_misc_preferences () { gsettings set org.gnome.desktop.background picture-options 'zoom' gsettings set org.gnome.desktop.background picture-uri "file://$XDG_DATA_HOME/wallpaper-light.svg" gsettings set org.gnome.desktop.background picture-uri-dark "file://$XDG_DATA_HOME/wallpaper-dark.svg" - if [ -n $_acp_dark_mode ] + if [ -n "$_acp_dark_mode" ] then gsettings set org.gnome.desktop.background primary-color '#101010' gsettings set org.gnome.desktop.background secondary-color '#101010' @@ -170,7 +170,7 @@ set_misc_preferences () { gsettings set org.gnome.desktop.background secondary-color '#008080' fi - if [ -n $_acp_dark_mode ] + if [ -n "$_acp_dark_mode" ] then gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark' @@ -195,7 +195,7 @@ then . "${XDG_CONFIG_HOME:-$HOME/.config}/reset-gnome-setup.local" fi -if [ -n $_acp_dark_mode ] +if [ -n "$_acp_dark_mode" ] then unset _acp_dark_mode fi