FollieHiyuki-dotfiles/home/.local/bin/Wayland/wlwpp
2021-02-13 19:28:59 +03:00

17 lines
332 B
Bash
Executable File

#!/bin/sh
dir="$HOME/Pictures/Wallpapers"
list=$(/usr/bin/ls "${dir}")
options=""
# Destroy running swaybg process
pkill swaybg
for i in $( wlr-randr | grep "\"*.\"" | awk '{print $1}' )
do
choice=$(echo "${list}" | shuf -n 1)
options="${options}--output ${i} --image ${dir}/${choice} --mode fill "
done
swaybg ${options} &