Use XSETTINGS to get theme without a DE
GTK is using XSETTINGS as the primary information for theme, icons and font. It surpasses what's inside the configuration files. DE will advertise the values they have in their own registries to XSETTINGS. Without a DE, users can get XSETTINGS with xsettingsd. It is shipped with `dump_xsettings` to get the current values. Unrelated, but without a DE, I doubt the content of gsettings matter much. GTK will not read it by itself. I would remove it. People running a part of a DE (gnome-control-center maybe?) will get XSETTINGS.
This commit is contained in:
parent
7913ad35ff
commit
f2fefb5379
1 changed files with 3 additions and 0 deletions
3
neofetch
3
neofetch
|
@ -3189,6 +3189,9 @@ get_style() {
|
|||
fi
|
||||
|
||||
# Check for general GTK3 Theme.
|
||||
if [[ -z "$gtk3_theme" ]] && type -p dump_xsettings >/dev/null; then
|
||||
gtk3_theme="$(dump_xsettings | sed -n "s,^${xfconf#/} ,,p")"
|
||||
fi
|
||||
if [[ -z "$gtk3_theme" ]]; then
|
||||
if [[ -f "${XDG_CONFIG_HOME}/gtk-3.0/settings.ini" ]]; then
|
||||
gtk3_theme="$(grep "^[^#]*$name" "${XDG_CONFIG_HOME}/gtk-3.0/settings.ini")"
|
||||
|
|
Loading…
Reference in a new issue