Below, the autostart script (autostart.sh) and the wallpaper script (wallpaper.sh) I'm using in Openbox:
~/.config/openbox/autostart.sh
# Run the system-wide support stuff
. $GLOBALAUTOSTART
# Programs to launch at startup
#numlock
numlockx &
#screensaver
xscreensaver &
# Programs that will run after Openbox has started
(sleep 2 && pypanel) &
#My wallpaper (random wallpaper script)
./wallpaper.sh
The last line in the autostart.sh script calls the following script:
~/wallpaper.sh
#!/bin/bash
WALLPAPERS="$HOME/photos-openbox"
ALIST=( `ls -w1 $WALLPAPERS` )
RANGE=${#ALIST[*]}
SHOW=$(( $RANDOM % $RANGE ))
feh --bg-scale $WALLPAPERS/${ALIST[$SHOW]}
I created the file ~/photos-openbox to contain the photos used in the wallpaper.sh script.
No comments:
Post a Comment