FVWM: Conditionally adding menu items

From: Scott Smedley <scottie7_at_tpg.com.au>
Date: Fri, 26 Mar 2004 18:34:53 +1100

Is there a better way (less code?) of conditionally adding menu items
to a menu than this?

AddToMenu "Multimedia_at_cd.xpm@" "MuLTiMeDia" Title
m4_syscmd(type xine >& /dev/null)
m4_ifelse(m4_sysval, 0,
+ "&XiNe (DVD Player)%xine.xpm%" Exec exec xine
)
m4_syscmd(type gmplayer >& /dev/null)
m4_ifelse(m4_sysval, 0,
+ "&MPLaYeR (DVD Player)%xine.xpm%" Exec exec gmplayer
)
m4_syscmd(type xmms >& /dev/null)
m4_ifelse(m4_sysval, 0,
+ "XMMS (MP&3 PLaYeR)%xmmsMini.xpm%" Exec exec xmms
)
m4_syscmd(type dvdrip >& /dev/null)
m4_ifelse(m4_sysval, 0,
+ "&dvd::rip" Exec exec dvdrip
)

SCoTT. :)
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Fri Mar 26 2004 - 01:39:32 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:56 BST