image: Fix bug with getting wallpaper from feh.

This commit is contained in:
dylan araps 2017-10-11 08:49:07 +11:00
parent b763c31ad7
commit b57cdee02a

View file

@ -2492,9 +2492,7 @@ get_wallpaper() {
*) *)
if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then
image="$(awk '{print $NF}' "${HOME}/.fehbg")" image="$(awk -F\' '/feh/ {printf $(NF-1)}' "${HOME}/.fehbg")"
image="${image#*\'}"
image="${image%\'*}"
elif type -p nitrogen >/dev/null; then elif type -p nitrogen >/dev/null; then
image="$(awk -F'=' '/file/ {printf $2;exit;}' \ image="$(awk -F'=' '/file/ {printf $2;exit;}' \