mirror of
https://git.davidovski.xyz/dot.git
synced 2024-08-15 00:43:28 +00:00
27 lines
528 B
Bash
Executable file
27 lines
528 B
Bash
Executable file
#!/bin/sh
|
|
|
|
feh --bg-fill ~/.config/bg.png
|
|
exit
|
|
|
|
setbg="feh --force-aliasing --bg-tile "
|
|
|
|
image=~/.config/bg.gif
|
|
dir=/tmp/bggif
|
|
|
|
printf "Converting..."
|
|
[ ! -d "$dir" ] || rm -rf "$dir"
|
|
mkdir -p "$dir"
|
|
|
|
convert -coalesce $image $dir/%05d.png
|
|
printf "done\n"
|
|
|
|
amount_of_frames=$(ls -1 "$dir" | wc -l)
|
|
frames_per_second=10
|
|
speed=$(echo "scale=3; ($amount_of_frames/$frames_per_second) * (1/$frames_per_second)" | bc -l)
|
|
|
|
while : ; do
|
|
for i in $(ls -1 $dir); do
|
|
$setbg $dir/$i;
|
|
sleep $speed
|
|
done;
|
|
done
|