Files
dotfiles/.config/i3/scripts/rotate_background.sh
Tristaan f21bbe6edb Cleanup dotfiles, fixed permissions
Also updated i3 config
2021-01-19 17:19:26 +01:00

10 lines
304 B
Bash
Executable File

#! /bin/bash
WALLPAPERS="/home/tristan/Pictures/bg_1440p"
ALIST=( `ls -w1 $WALLPAPERS` )
RANGE=${#ALIST[@]}
let "number = $RANDOM"
let LASTNUM="`cat $WALLPAPERS/.last` + $number"
let "number = $LASTNUM % $RANGE"
echo $number > $WALLPAPERS/.last
nitrogen --set-scaled --save $WALLPAPERS/${ALIST[$number]}