10 lines
304 B
Bash
Executable File
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]}
|