mathr / blog / #

Random tiling wallpaper with fbsetbg

fbsetbg (a desktop background/wallpaper setter from the fluxbox project) has options for random wallpaper selection from a directory, and tiling wallpaper. Unfortunately it doesn't seem to support both at the same time.

I found a solution, however:

1. Install feh (an image viewer and cataloguer).
2. Create a script ~/bin/wallpaper as follow:
#!/bin/bash
feh --bg-tile \$1
3. Edit ~/.fluxbox/lastwallpaper as follows (replacing username as appropriate):
wpsetters /home/claude/bin/wallpaper
random|/home/claude/share/wallpapers/|:0.0
random|/home/claude/share/wallpapers/|:0.1
4. Edit ~/.fluxbox/init as follows:
session.screen0.rootCommand:    fbsetbg -l
session.screen1.rootCommand:    fbsetbg -l

And then enjoy your random tiled backgrounds. If you don't have a dual head setup, then just remove the stuff relating to the second display, I don't know if its harmless or not to leave it there.

Currently I'm using some created with GridFlow: Cycle Tile. Not quite perfectly seamless, however, need to fix that and rerender them. EDIT: should now be seamless, was a problem with dividing too soon creating rounding errors...