Skip to content

Commit

Permalink
fix: add dconf theme fallback to ublue-fastfetch, too (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
tulilirockz authored Jan 11, 2025
1 parent 96780f2 commit 3056cb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion ublue/fastfetch/src/ublue-bling-fastfetch
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions ublue/fastfetch/ublue-fastfetch.spec
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 3056cb5

Please sign in to comment.