Don't hardcode theme/wallpaper detection to XDG_CURRENT_DESKTOP, instead use ''
This commit is contained in:
parent
22f50e634f
commit
7e5863dd83
1 changed files with 8 additions and 3 deletions
11
neofetch
11
neofetch
|
@ -1426,8 +1426,10 @@ getstyle () {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -n "$DISPLAY" ] && [ "$os" != "Mac OS X" ]; then
|
if [ -n "$DISPLAY" ] && [ "$os" != "Mac OS X" ]; then
|
||||||
# Current DE
|
# Get DE if user has disabled the function.
|
||||||
case "$XDG_CURRENT_DESKTOP" in
|
[ -z "$de" ] && getde
|
||||||
|
|
||||||
|
case "$de" in
|
||||||
"KDE"*)
|
"KDE"*)
|
||||||
kdeconfigdir
|
kdeconfigdir
|
||||||
|
|
||||||
|
@ -1865,7 +1867,10 @@ getwallpaper () {
|
||||||
img="$(awk -F'=' '/file/ {printf $2;exit;}' "$XDG_CONFIG_HOME/nitrogen/bg-saved.cfg")"
|
img="$(awk -F'=' '/file/ {printf $2;exit;}' "$XDG_CONFIG_HOME/nitrogen/bg-saved.cfg")"
|
||||||
|
|
||||||
elif type -p gsettings >/dev/null 2>&1; then
|
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)" ;;
|
"MATE"*) img="$(gsettings get org.mate.background picture-filename 2>/dev/null)" ;;
|
||||||
*) img="$(gsettings get org.gnome.desktop.background picture-uri 2>/dev/null)" ;;
|
*) img="$(gsettings get org.gnome.desktop.background picture-uri 2>/dev/null)" ;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue