On 07 Dec 2003 17:29:24 +0000, Mikhael Goikhman wrote:
>
> On 07 Dec 2003 17:12:03 +0200, Micha Feigin wrote:
> >
> > Is it possible to produce a menu title or entry from an external
> > command on a statically created menu?
> > For example is it possible to have the menu title or entry show the
> > current time and date in the menu instead of using a pop up window.
>
> I assume you can read about really dynamical submenus in the man page.
>
> Here is one way to have a partially dynamical menu you want:
>
> DestroyFunc ShowTimeTitledMenu
> AddToFunc ShowTimeTitledMenu
> + I DestroyMenu TimeTitledMenu
> + I AddToFunc TimeTitledMenu
> + I Echo PipeRead `date +'+ "%d-%b-%Y %T" Title'`
> + I + I "item 1 in your menu" Exec command 1
> + I + I "item 2 in your menu" Exec command 2
> + I Menu TimeTitledMenu
Ok, this obviously contains 3 small typos, here is the correct version,
(this time I actually pasted this into FvwmConsole to see it works):
DestroyFunc ShowTimeTitledMenu
AddToFunc ShowTimeTitledMenu
+ I DestroyMenu TimeTitledMenu
+ I AddToMenu TimeTitledMenu
+ I PipeRead `date +'+ "%d-%b-%Y %T" Title'`
+ I + "item 1 in your menu" Exec command 1
+ I + "item 2 in your menu" Exec command 2
+ I Menu TimeTitledMenu
> Now, every time you want to show your menu with the current time title,
> use "ShowTimeTitledMenu" function in place of "Menu" command.
Regards,
Mikhael.
--
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 Sun Dec 07 2003 - 11:37:54 GMT