From 7e5863dd83d0aa251333318d50c8b09c07d0bad9 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 2 Apr 2016 01:59:46 +1100 Subject: [PATCH] Don't hardcode theme/wallpaper detection to XDG_CURRENT_DESKTOP, instead use '' --- neofetch | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index c1e40bfc..9598d1b0 100755 --- a/neofetch +++ b/neofetch @@ -1426,8 +1426,10 @@ getstyle () { esac if [ -n "$DISPLAY" ] && [ "$os" != "Mac OS X" ]; then - # Current DE - case "$XDG_CURRENT_DESKTOP" in + # Get DE if user has disabled the function. + [ -z "$de" ] && getde + + case "$de" in "KDE"*) kdeconfigdir @@ -1865,7 +1867,10 @@ getwallpaper () { img="$(awk -F'=' '/file/ {printf $2;exit;}' "$XDG_CONFIG_HOME/nitrogen/bg-saved.cfg")" elif type -p gsettings >/dev/null 2>&1; then - case "$XDG_CURRENT_DESKTOP" in + # Get DE if user has disabled the function. + [ -z "$de" ] && getde + + case "$de" in "MATE"*) img="$(gsettings get org.mate.background picture-filename 2>/dev/null)" ;; *) img="$(gsettings get org.gnome.desktop.background picture-uri 2>/dev/null)" ;; esac