diff --git a/linuxdeploy-plugin-gtk.sh b/linuxdeploy-plugin-gtk.sh index 41d8c18..78c5e0b 100755 --- a/linuxdeploy-plugin-gtk.sh +++ b/linuxdeploy-plugin-gtk.sh @@ -226,9 +226,9 @@ mkdir -p "$HOOKSDIR" cat > "$HOOKFILE" <<\EOF #! /usr/bin/env bash -COLOR_SCHEME="$(dbus-send --session --dest=org.freedesktop.portal.Desktop --type=method_call --print-reply --reply-timeout=1000 /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.Read 'string:org.freedesktop.appearance' 'string:color-scheme' 2>/dev/null | tail -n1 | cut -b35- | cut -d' ' -f2)" +COLOR_SCHEME="$(dbus-send --session --dest=org.freedesktop.portal.Desktop --type=method_call --print-reply --reply-timeout=1000 /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.Read 'string:org.freedesktop.appearance' 'string:color-scheme' 2> /dev/null | tail -n1 | cut -b35- | cut -d' ' -f2 || printf '')" if [ -z "$COLOR_SCHEME" ]; then - COLOR_SCHEME="$(gsettings get org.gnome.desktop.interface color-scheme 2> /dev/null)" + COLOR_SCHEME="$(gsettings get org.gnome.desktop.interface color-scheme 2> /dev/null || printf '')" fi case "$COLOR_SCHEME" in "1"|"'prefer-dark'") GTK_THEME_VARIANT="dark";;