From f1450d1fc8e4a2a96514c0ca830d2c82ddbb25cd Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 9 Feb 2016 21:12:09 +1100 Subject: [PATCH] Add support for showing 'MATE' wallpaper --- fetch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fetch b/fetch index 9e284bff..07b30a42 100755 --- a/fetch +++ b/fetch @@ -1460,7 +1460,12 @@ getwallpaper () { img="$(awk -F'=' '/file/ {printf $2}' "$HOME/.config/nitrogen/bg-saved.cfg")" elif type -p gsettings >/dev/null 2>&1; then - img="$(gsettings get org.gnome.desktop.background picture-uri 2>/dev/null)" + case "$XDG_CURRENT_DESKTOP" 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 + + # Strip quotes etc from the path. img=${img/'file://'} img=${img//\'} fi