FVWM: Re: dynamic menus

From: Charles Hines <>
Date: Thu, 14 Dec 1995 14:34:44 -0500

>>>>> "Rob" == Robert Nation 885-9815 <rnation_at_mansvr.sanders.lockheed.com> writes:

>> Actually, you should be able to do it using a function. Yup - I just
>> did the following in my .fvwm2rc:
>>
>> ------------------------------------------------------------
>> Mouse 2 R MC DynamicMenu
>>
>> AddToMenu DMenu "Dynamic Menu" Title
>>
>> AddToFunc DynamicMenu "I" DestroyMenu "DMenu"
>> + "I" Read .fvwm2rc-dynmenu
>> + "I" Popup DMenu
>> ------------------------------------------------------------

Rob> With a little magic help from sed, someone could turn this into the
Rob> often requested "menu that shows all executables in a directory":

I remembered that request that right after I replied and had a similar
thought.

....
Rob> Cool man! But,
Rob> 1. It seems pretty useless, unless you've got a bunch of programs
Rob> that are graphical and don't need any arguments.

True.

But perhaps some more usefull ideas could be derived from this. Use a
sed/awk/perl command to build up a menu that has function calls and
passing in the found filenames, for things like:

  - a menu of background files (and the function invokes xv on them).
  - to get all of the modes from the current version of xlock
    dynamically so you don't have to update your menu every time a new
    version comes out.
  - a list of files in a directory that you freqently edit to pop them
    up in your favorite editor (perhaps XEmacs & gnuclient to put them
    into your currently running XEmacs).

Rob> 2. I think there's a race condition between doing the exec
Rob> and the read. As I recall, "exec" always background tasks, so there's
Rob> no way to make sure its done before doing the read.

Ah. Hadn't thought about that...

I wonder how difficult it would be to implement a solution to that.
Like an Exec variant that puts it into the background so we don't lock
up fvwm, but monitors the child to see if it's still alive and have a
Wait variant that waits for the last Exec'd child to finish. I'll
have to look into something like that.

Chuck
--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Thu Dec 14 1995 - 13:35:09 GMT

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