]> git.draconx.ca Git - fvwmconf.git/blob - common/wallpaper
Adjust wallpaper menu formatting.
[fvwmconf.git] / common / wallpaper
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"
5
6 CopyMenuStyle * MenuWallpaper
7 MenuStyle MenuWallpaper ItemFormat "%.2|%5.5c%-16.3>%1|"
8
9 DestroyMenu MenuWallpaper
10 AddToMenu   MenuWallpaper
11  + DynamicPopupAction MakeMenuWallpaper
12 ChangeMenuStyle MenuWallpaper MenuWallpaper
13
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'
19
20 DestroyFunc SetWallpaper
21 AddToFunc   SetWallpaper
22  + I Exec exec ln -sf "$0" "$[BGFILE]"
23  + I Exec exec $[SETROOT] "$[BGFILE]"
24
25 DestroyFunc SetInitialWallpaper
26 AddToFunc   SetInitialWallpaper
27  + I Exec if [ -f "$[BGFILE]" ]; then \
28               $[SETROOT] "$[BGFILE]"; \
29           else \
30               $[SETROOT] "$($[FVWM_USERDIR]/scripts/randombg.pl $[BGROOT])"; \
31           fi
32
33 AddToFunc InitFunction I SetInitialWallpaper
34 AddToFunc SessionInitFunction I SetInitialWallpaper