LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   fvwm2: show an FvwmForm after application launched from menu is closed (https://www.linuxquestions.org/questions/linux-desktop-74/fvwm2-show-an-fvwmform-after-application-launched-from-menu-is-closed-549548/)

ajoffe 04-27-2007 03:15 PM

fvwm2: show an FvwmForm after application launched from menu is closed
 
Hi,

I've created the following fvwm2 menu for window manager operations:

Code:

# Window manager operations
AddToMenu "WindowManager" "Window Manager" Title
+ "Edit config" Exec exec xterm -e nano $HOME/.fvwm/.fvwm2rc &
+ "" Nop
+ "Restart fvwm2" Restart fvwm2

On the "Edit config" line, after the nano instance showing the .fvwm2rc config file is closed, I would then like to display an FvwmForm asking the user whether to restart fvwm2, so that any changes will be applied (I've already defined the form elsewhere in my fvwm2rc). What is the syntax for showing a form after an application (in this case, nano running in xterm) is closed?:scratch:

Thanks!

slakmagik 04-29-2007 02:37 AM

I'm near to an fvwm zealot but I still don't know much about it and would do things like this with {gtk,x,c}dialog or {g,}xmessage, anyway. It's perfectly simple and straightforward that way. Maybe it is with FvwmForms but I find them awkward and klunky. I can't figure the synchronization of a non-fvwm term/editor and the fvwm module of the FvwmForm. so the following sucks, but...

Make sure FvwmCommandS is started in your StartFunction, and then add
Code:

+ "Demo" Exec exec bash -c 'mrxvt -e vim && FvwmCommand "Module FvwmForm FvwmForm-Form"'
to your menu. (Make that 'xterm' and 'nano' and whatever your form is.) Dunno what weirdness fvwm is doing when it passes the remainder of the line to the shell but that seems to do it. If that's too weird, maybe write a one-line script like
Code:

#!/bin/sh
mrxvt -e vim && FvwmCommand "Module FvwmForm FvwmForm-Form"

Then add
Code:

+ "Title" Exec exec /path/to/script
to your menu and it might work.

Also, you should almost never need to restart fvwm - just
Code:

+ "&Reconfigure" Read config
should suffice.

Anyway - if that won't do and nobody else jumps in here, try #fvwm on freenode or the fvwm mailing list.


All times are GMT -5. The time now is 02:01 PM.