[PR] dylanaraps/neofetch#1831 from vincentbernat - Use XSETTINGS to get theme without a DE

Upstream PR: https://github.com/dylanaraps/neofetch/pull/1831
Thanks to @vincentbernat

Co-authored-by: Vincent Bernat <vincent@bernat.ch>
This commit is contained in:
Azalea (on HyDEV-Daisy) 2022-08-11 15:50:33 -04:00
commit 9d48719fb9

View file

@ -3536,6 +3536,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")"