aboutsummaryrefslogtreecommitdiff
path: root/scripts/random_background_sway
blob: c67d95ae5091ad88388ac0cab44d8883db01a8a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

. $HOME/.files

#Screen background feh
shopt -s nullglob

pics=($DOTFILEBASE/pictures/b_*)
#echo $pics
len=${#pics[*]}
ran=$(($RANDOM % len))


echo  ${pics[$ran]}
killall swaybg
swaybg -i ${pics[$ran]} &