I don't mind having the same wallpaper on all four of my desktop workspaces,
but I do get tired of the same one all the time. It's easy enough for you to add
the following to your ~/.fluxbox/menu:
[submenu] (Wallpaper)Then you can just hold your mouse over the menu entry and the entire list of all
[wallpapers] (/home/user/wallpaper( {feh --bg-center}
[end]
TODAY=$(date ¦cut -c 9,10)If I type date without any extra switches, I get:
TODAYWP=~/bin/$(grep $TODAY ~/bin/mywalls.txt ¦cut -c 6-19)
export TODAY TODAYWP
Tue Jul 1 00:09:57 CDT 2008But, if I type date ¦cut -c 9,10 I get the following:
1Maybe you noticed the 1 is not lined up vertically with the blockquotes above.
#!/bin/shIf you look at the grep command above, you'll see a -q after it, so that when you
TODAY=$(date ¦cut -c 9,10)
TODAYWP=$(grep $TODAY ~/wallpaper/mywalls.txt ¦cut -c 6-23)
if ps -U dennyboy ¦grep -q X11R6;
then
DISPLAY=:0.0 fbsetbg -c ~/wallpaper/$TODAYWP
else
echo "Denny's not running X right now"
fi
01 - wpaa.jpgMy scheduled cronjob entry to change the wallpaper looks like this:
02 - wpab.jpg
03 - wpac.jpg
04 - wpad.jpg
and so on all the way to 31.
01 8 * * * $HOME/bin/todaywp.sh > /dev/null 2>&1Now, as I said before, you might close X but still be logged in. If you restart X
. ~/./.kshrcAnd in the next four lines, after the environment is refreshed, the wallpaper is set
cat ~/.fluxbox/1sthalf > ~/.fluxbox/initBefore I started messing around with my old existing ~/.fluxbox/init file, I backed
echo "session.screen0.rootCommand: fbsetbg -c `env ¦grep TODAYWP`" ¦ \
cut -c 1-43,67-78 >> ~/.fluxbox/init
cat ~/.fluxbox/2ndhalf >> ~/.fluxbox/init
No affiliation between this site and the OpenBSD project exists or is implied.