Name: Anonymous 2012-07-01 15:42
im running openbox+nitrogen. i wrote a little script to cycle through and change my wallpeper (im going to set it up as a cron job) but i cant quite seem to get it to go. help me out /prog/?
gives me the error: failed to open file
cat:/home/harry/images/wallpapers/walls/.last: No such file or directory
ERROR:/home/harry/images/wallpapers/wallsls -w1 $WALLPAPERS': No Such File or directory
#! /bin/bash
#using the path WALLPAPERS will select a new random wallpaper
WALLPAPERS="/home/harry/wallpapers/walls"
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]}
exit
gives me the error: failed to open file
cat:/home/harry/images/wallpapers/walls/.last: No such file or directory
ERROR:/home/harry/images/wallpapers/wallsls -w1 $WALLPAPERS': No Such File or directory
#! /bin/bash
#using the path WALLPAPERS will select a new random wallpaper
WALLPAPERS="/home/harry/wallpapers/walls"
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]}
exit