#!/bin/bash
PATH="/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin"
DIR="/home/pejman/Downloads/Wallpaper/"
FNAME=$(ls "$DIR" | while read x; do echo "`expr $RANDOM % 1000`:$x"; done | sort -n | sed 's/[0-9]*://' | head -n 1)
DISPLAY=:0 feh --bg-scale "$DIR/$FNAME"
chmod +x /home/pejman/scripts/change-wallpaper.sh
0 * * * * /home/pejman/scripts/change-wallpaper.sh &> /dev/null
BY: Pejman Moghadam
TAG: cron, feh, wallpaper, bash, random
DATE: 2013-12-24 22:59:29