getwallpaper: Add nitrogen support

This commit is contained in:
Dylan 2016-01-20 21:35:32 +11:00
parent a9e3db5d8f
commit 153f804626

6
fetch
View file

@ -962,7 +962,11 @@ getvisualstyle () {
getwallpaper () {
case "$os" in
"Linux" | *"BSD")
img="$(awk -F\' '/feh/ {printf $2}' $HOME/.fehbg)"
if type -p feh >/dev/null 2>&1; then
img="$(awk -F\' '/feh/ {printf $2}' "$HOME/.fehbg")"
elif type -p nitrogen >/dev/null 2>&1; then
img="$(awk -F'=' '/file/ {printf $2}' "$HOME/.config/nitrogen/bg-saved.cfg")"
fi
;;
"Mac OS X")