ability to choose specific image

This commit is contained in:
array-in-a-matrix 2022-01-16 00:52:01 -05:00
parent c37fe66e14
commit 6f5c1fd4a2

View file

@ -1,9 +1,13 @@
#!/bin/sh
# pywal colors
# get location of a random image
image=$(find -L /home/linux/Pictures/Wallpapers/ -type f | shuf -n1)
# if no commandline argument is given, get location of a random image
if [[ -z $1 ]]; then
IMAGE=$(find -L /home/linux/Pictures/Wallpapers/ -type f | shuf -n1)
else
IMAGE="$1"
fi
# generate color scheme of that image
wal -i "$image"
wal -i "$IMAGE"
# make shell and tty that color
cat ~/.cache/wal/sequences
source ~/.cache/wal/colors-tty.sh
@ -11,4 +15,5 @@ source ~/.cache/wal/colors-tty.sh
pywalfox update
# update background with new image
killall swaybg
swaybg -i "$image" -m fill &
swaybg -i "$IMAGE" -m fill &
echo "Done."