master hovercats/bin / sh / rbgs
 1#!/bin/sh -e
 2
 3cd "$HOME"/usr/img
 4
 5while :; do
 6    set -- *
 7    n=$(echo $# | awk '{srand(); print int(rand()*$0) + 1}')
 8    eval "wall=\$$n"
 9    # shellcheck disable=2154
10    bgs "$wall"
11    sleep 300
12done
13
14
15# I wasnt sure as to how to create the random generator without using shuf,
16# so Ive found this for reference:
17# https://stackoverflow.com/a/6747490