Fix string comparison

This commit is contained in:
Anthony Rose 2024-06-05 12:55:31 +01:00
parent c5ea966b9d
commit d6bde9b2b4

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# Leave commented for light mode, or uncomment for dark mode. # 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) test -x /usr/bin/gsettings || (echo "gsettings not found" && exit 1)
@ -60,7 +60,7 @@ set_nautilus_preferences
set_gnome_terminal_preferences () { set_gnome_terminal_preferences () {
gsettings set org.gnome.Terminal.Legacy.Settings menu-accelerator-enabled false gsettings set org.gnome.Terminal.Legacy.Settings menu-accelerator-enabled false
gsettings set org.gnome.Terminal.Legacy.Settings shortcuts-enabled false gsettings set org.gnome.Terminal.Legacy.Settings shortcuts-enabled false
if [ -n $_acp_dark_mode ] if [ -n "$_acp_dark_mode" ]
then then
gsettings set org.gnome.Terminal.Legacy.Settings theme-variant 'dark' gsettings set org.gnome.Terminal.Legacy.Settings theme-variant 'dark'
else else
@ -77,7 +77,7 @@ set_gnome_terminal_preferences () {
]" ]"
gsettings set "$_acp_terminal_profile" preserve-working-directory 'always' gsettings set "$_acp_terminal_profile" preserve-working-directory 'always'
gsettings set "$_acp_terminal_profile" use-theme-colors false gsettings set "$_acp_terminal_profile" use-theme-colors false
if [ -n $_acp_dark_mode ] if [ -n "$_acp_dark_mode" ]
then then
gsettings set "$_acp_terminal_profile" background-color '#101010' gsettings set "$_acp_terminal_profile" background-color '#101010'
gsettings set "$_acp_terminal_profile" foreground-color '#C0C0C0' 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-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 "file://$XDG_DATA_HOME/wallpaper-light.svg"
gsettings set org.gnome.desktop.background picture-uri-dark "file://$XDG_DATA_HOME/wallpaper-dark.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 then
gsettings set org.gnome.desktop.background primary-color '#101010' gsettings set org.gnome.desktop.background primary-color '#101010'
gsettings set org.gnome.desktop.background secondary-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' gsettings set org.gnome.desktop.background secondary-color '#008080'
fi fi
if [ -n $_acp_dark_mode ] if [ -n "$_acp_dark_mode" ]
then then
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-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" . "${XDG_CONFIG_HOME:-$HOME/.config}/reset-gnome-setup.local"
fi fi
if [ -n $_acp_dark_mode ] if [ -n "$_acp_dark_mode" ]
then then
unset _acp_dark_mode unset _acp_dark_mode
fi fi