From 3056cb5466e1b8cd674ad61cda7e1b6bc9b3a4d8 Mon Sep 17 00:00:00 2001 From: Tulip Blossom Date: Sat, 11 Jan 2025 13:07:54 -0300 Subject: [PATCH] fix: add dconf theme fallback to ublue-fastfetch, too (#111) --- ublue/fastfetch/src/ublue-bling-fastfetch | 8 +++++++- ublue/fastfetch/ublue-fastfetch.spec | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ublue/fastfetch/src/ublue-bling-fastfetch b/ublue/fastfetch/src/ublue-bling-fastfetch index 3a4f9a8..8ffd754 100755 --- a/ublue/fastfetch/src/ublue-bling-fastfetch +++ b/ublue/fastfetch/src/ublue-bling-fastfetch @@ -1,7 +1,13 @@ #!/usr/bin/env bash -THEME=$(gsettings get org.gnome.desktop.interface accent-color 2>/dev/null || echo "'slate'") +THEME=$(dconf read /org/gnome/desktop/interface/accent-color 2>/dev/null || printf '%s' "\'$DEFAULT_THEME\'") +# Dconf will fail if the accent-color has not been changed yet +if [ "$THEME" == "" ] ; then + # Gsettings will not update if the system's schemas have not been configured properly + THEME=$(gsettings get org.gnome.desktop.interface accent-color 2>/dev/null || printf '%s' "\'$DEFAULT_THEME\'") +fi THEME=${THEME//\'/} +THEME=${FASTFETCH_FORCE_THEME:-$THEME} FASTFETCH_COLOR_SET="38;2;53;132;228" case $THEME in diff --git a/ublue/fastfetch/ublue-fastfetch.spec b/ublue/fastfetch/ublue-fastfetch.spec index bc5720d..5148a4a 100644 --- a/ublue/fastfetch/ublue-fastfetch.spec +++ b/ublue/fastfetch/ublue-fastfetch.spec @@ -1,8 +1,8 @@ %global debug_package %{nil} Name: ublue-fastfetch -Version: 0.1.0 -Release: 3%{?dist} +Version: 0.1.1 +Release: 1%{?dist} Summary: Fastfetch configuration for Universal Blue systems License: Apache-2.0