SetEnv BGROOT "$[HOME]/wallpaper"
CopyMenuStyle * MenuWallpaper
-MenuStyle MenuWallpaper ItemFormat "%.2|%5.5c%2.3>%1|"
+MenuStyle MenuWallpaper ItemFormat "%.2|%5.5c%-16.3>%1|"
DestroyMenu MenuWallpaper
AddToMenu MenuWallpaper
+ I Exec exec ln -sf "$0" "$[BGFILE]"
+ I Exec exec $[SETROOT] "$[BGFILE]"
-AddToFunc InitFunction
- + I Exec exec $[SETROOT] "$[BGFILE]"
+DestroyFunc SetInitialWallpaper
+AddToFunc SetInitialWallpaper
+ + I Exec if [ -f "$[BGFILE]" ]; then \
+ $[SETROOT] "$[BGFILE]"; \
+ else \
+ $[SETROOT] "$($[FVWM_USERDIR]/scripts/randombg.pl $[BGROOT])"; \
+ fi
+
+AddToFunc InitFunction I SetInitialWallpaper
+AddToFunc SessionInitFunction I SetInitialWallpaper