wallpaper: Add support for pywal.

This commit is contained in:
Dylan Araps 2018-04-14 08:18:08 +10:00
parent f7cf1073c6
commit 8253bd7e9a
1 changed files with 6 additions and 4 deletions

View File

@ -2744,6 +2744,11 @@ END
# Get DE if user has disabled the function. # Get DE if user has disabled the function.
((de_run != 1)) && get_de ((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 case "$de" in
"MATE"*) image="$(gsettings get org.mate.background picture-filename)" ;; "MATE"*) image="$(gsettings get org.mate.background picture-filename)" ;;
"Xfce"*) "Xfce"*)
@ -2757,10 +2762,7 @@ END
;; ;;
*) *)
if [[ -f "${HOME}/.cache/wal/wal" ]]; then if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then
image="$(< "${HOME}/.cache/wal/wal")"
elif type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then
image="$(awk -F\' '/feh/ {printf $(NF-1)}' "${HOME}/.fehbg")" image="$(awk -F\' '/feh/ {printf $(NF-1)}' "${HOME}/.fehbg")"
elif type -p nitrogen >/dev/null; then elif type -p nitrogen >/dev/null; then