From 8253bd7e9a320d5a573e90d1d7c2a740ef28c4b8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 14 Apr 2018 08:18:08 +1000 Subject: [PATCH] wallpaper: Add support for pywal. --- neofetch | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index 07889814..2e89f4f4 100755 --- a/neofetch +++ b/neofetch @@ -2744,6 +2744,11 @@ END # Get DE if user has disabled the function. ((de_run != 1)) && get_de + if type -p wal >/dev/null && [[ -f "${HOME}/.cache/wal/wal" ]]; then + image="$(< "${HOME}/.cache/wal/wal")" + return + fi + case "$de" in "MATE"*) image="$(gsettings get org.mate.background picture-filename)" ;; "Xfce"*) @@ -2757,10 +2762,7 @@ END ;; *) - if [[ -f "${HOME}/.cache/wal/wal" ]]; then - image="$(< "${HOME}/.cache/wal/wal")" - - elif type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then + if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then image="$(awk -F\' '/feh/ {printf $(NF-1)}' "${HOME}/.fehbg")" elif type -p nitrogen >/dev/null; then