1 # Stuff to handle pretty pictures on the background.
2 SetEnv SETROOT "fvwm-root -r"
3 SetEnv BGFILE "$[FVWM_USERDIR]/.state/wallpaper$[screen].png"
4 SetEnv BGROOT "$[HOME]/wallpaper"
6 CopyMenuStyle * MenuWallpaper
7 MenuStyle MenuWallpaper ItemFormat "%.2|%5.5c%-16.3>%1|"
9 DestroyMenu MenuWallpaper
10 AddToMenu MenuWallpaper
11 + DynamicPopupAction MakeMenuWallpaper
12 ChangeMenuStyle MenuWallpaper MenuWallpaper
14 DestroyFunc MakeMenuWallpaper
15 AddToFunc MakeMenuWallpaper
16 + I DestroyMenu recreate MenuWallpaper
17 + I AddToMenu MenuWallpaper Wallpaper Title
18 + I PipeRead 'exec $[FVWM_USERDIR]/scripts/bgmenu.zsh $[BGROOT] MenuWallpaper'
20 DestroyFunc SetWallpaper
21 AddToFunc SetWallpaper
22 + I Exec exec ln -sf "$0" "$[BGFILE]"
23 + I Exec exec $[SETROOT] "$[BGFILE]"
25 DestroyFunc SetInitialWallpaper
26 AddToFunc SetInitialWallpaper
27 + I Exec if [ -f "$[BGFILE]" ]; then \
28 $[SETROOT] "$[BGFILE]"; \
30 $[SETROOT] "$($[FVWM_USERDIR]/scripts/randombg.pl $[BGROOT])"; \
33 AddToFunc InitFunction I SetInitialWallpaper
34 AddToFunc SessionInitFunction I SetInitialWallpaper