Re: FVWM: Dynamic menu titles

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Sun, 7 Dec 2003 17:29:24 +0000

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

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:32:01 GMT

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