
# ------------------------------------------------------------------------
# A function which choose an appropriate set root program which can scale
# an image 
DestroyFunc AFuncCheckAndSetScaledBg
AddToFunc   AFuncCheckAndSetScaledBg
+ I Test (x fvwm-root) Exec exec fvwm-root --scale $0
+ I TestRc (Match) break 1
+ I Test (x wmsetbg) Exec exec wmsetbg --scale $0
+ I TestRc (Match) break 1
+ I Test (x xwininfo x display) Exec exec display -window root -geometry `xwininfo -root | grep geometry | cut -d" " -f4`\! $0
+ I TestRc (Match) break 1
+ I Test (x Esetroot) Exec exec Esetroot -scale $0
+ I TestRc (Match) break 1
+ I Test (x xv) Exec exec xv -root -quit -max $0
+ I TestRc (Match) break 1
# no program found!
+ I Exec exec xsetroot -mod 4 4 -fg rgb:54/6/6 -bg grey20

DestroyFunc AFuncSetBackground
AddToFunc   AFuncSetBackground
+ I AFuncCheckAndSetScaledBg $[METISSE_FVWM_CONFIG_DIR]/images/backgrounds/sky-metisse.jpg
# opale background
#+ I AFuncCheckAndSetScaledBg $[OPALE_CONFIG_DIR]/backgrounds/sky-default.jpg
