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
Name:
Anonymous2012-07-01 16:01
nobody familiar with bash scripting?
Name:
Anonymous2012-07-01 16:09
this is /prog/, not /bash/
Name:
Anonymous2012-07-01 17:50
Why do you need a wallpaper you fucking sick immature weeaboo. You're a disgusting pedophile, there's absolutely no reason to display a wallpaper. Ever. Fucking grow up.
I really hope they will soon forbid the use of general purpose computers for the laymen. All they need is a fucking TV set with customizable menus.
Name:
Anonymous2012-07-01 20:21
>>4 I really hope they will soon forbid the use of general purpose computers for the laymen.
I hope you die in a fucking fire.
Name:
Anonymous2012-07-01 22:05
I don't have a clue about bash, but your script kinda relies on the file /home/harry/wallpapers/walls/.last existing before first execution. Does the file exist? Dos it contain a number?
Name:
!L33tUKZj5I2012-07-02 10:32
>>6
This. Probably something to do with file/folder permissions being off.