Configure Pywal
This commit is contained in:
@@ -12,13 +12,13 @@ bgloc="${XDG_DATA_HOME:-$HOME/.local/share/}/bg"
|
||||
trueloc="$(readlink -f "$1")" &&
|
||||
case "$(file --mime-type -b "$trueloc")" in
|
||||
image/* ) ln -sf "$(readlink -f "$1")" "$bgloc" ;;
|
||||
inode/directory ) ln -sf "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" ;;
|
||||
inode/directory ) trueloc=$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1) && ln -sf "$trueloc" "$bgloc" ;;
|
||||
*) notify-send "Error" "Not a valid image." ; exit 1;;
|
||||
esac
|
||||
|
||||
# If pywal is installed, use it.
|
||||
command -v wal >/dev/null 2>&1 &&
|
||||
wal -i "$trueloc" -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 &&
|
||||
wal -i "$trueloc" -n -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 &&
|
||||
pidof dwm >/dev/null && xdotool key super+F12
|
||||
|
||||
xwallpaper --zoom "$bgloc"
|
||||
|
||||
Reference in New Issue
Block a user