Random Images for Background

Based on the Lisp-Script in the Wiki, I created a script that’s able to list wallpapers according to different directories (with ext:args), which works pretty well together with other scripting-languages


You have to set the defconstants according to the dirs on your System :wink:

e.g. for a small shellscript utilizung this: Click Me

I put 5 buttons into my FvwmButtons to change the theme of the bgs, another one on the right to switch it

*FvwmShelf: (23x2, Title(Side) " Dark", Left, Action(Mouse 1) `Exec exec echo dark > ~/.t/1`)
*FvwmPanel: (23x2, Title(Side) " Switch", Left, Action(Mouse 1) `Exec exec Esetroot -scale $(rand.lisp $(cat ~/.t/1))`)

Comments requested

PS: You need to create a directory .t in your Home-Dir to make it work

You really should use more quotes:

exec Esetroot -scale "$(rand.lisp $(cat ~/.t/1))"`)

Also, probably faster is to do:

exec Esetroot -scale "$(rand.lisp $(< ~/.t/1))"`)

Admittedly, the $(< file) construct is bash specific.

– Thomas Adam