dotfiles/bin/setbg.sh

6 lines
246 B
Bash
Raw Normal View History

2021-05-23 17:31:52 +02:00
NO_OUTPUTS=$(swaymsg -t get_outputs | jq 'length')
IFS=' '
paste <(find ~/wp/ -type f | shuf | head -n$NO_OUTPUTS) <(swaymsg -t get_outputs | jq -r 'map(.name)|.[]') | while read file output; do
swaymsg output $output bg "$file" stretch
done