Hi, I’m trying to swallow a terminal in a Fvwm button, it works but if I restart Fvwm the terminal is restarted so for example if I launch irssi in this term the session is closed.
It happens on FVWM 2.5.16 and 17 on linux and 2.5.16 on FreeBSD
Here is a little config to show what happens :
DestroyFunc StartFunction
AddToFunc StartFunction
+ I Module FvwmCommandS
+ I Module FvwmAnimate
+ I Module FvwmEvent
+ I Module FvwmButtons ZConsole
##################################################
# Console
###################################################
Style "ZConsole" NoTitle, !Handles, !Borders, Sticky, WindowListSkip, \
CirculateSkip, StaysOnBottom, FixedPosition, FixedSize, !Iconifiable
DestroyModuleConfig ZConsole
*ZConsole: Geometry 800x400-0-0
*ZConsole: Colorset 50
*ZConsole: ActiveColorset 50
*ZConsole: PressColorset 50
*ZConsole: BoxSize smart
*ZConsole: Columns 800
*ZConsole: Rows 400
*ZConsole: Frame 0
#*ZConsole: (800x400, Swallow (UseOld,NoKill,Respawn) "Console" 'Exec xterm -name Console')
#*ZConsole: (800x400, Swallow (UseOld,NoKill,Respawn) "Console" 'Exec exec xterm -name Console')
#*ZConsole: (800x400, Swallow (UseOld,NoKill,Respawn) "Console" Nop, \
# Action `Exec "Console" xterm -name Console`)
#*ZConsole: (800x400, Swallow (UseOld,NoKill,Respawn) "Console" Nop, \
# Action `Exec "Console" xterm -name Console &`)
I’ve tried the las 4 buttons and no one works.
Just launch the config then start something ( top / ls -a … ) then restart fvwm and oups clean terminal
I don’t know what to do thx for reply
I think that you want:
*ZConsole: (Swallow (UseOld, NoClose) "Console" `Exec xterm -name Console`)
as the format is:
Swallow [(flags)] hangon command
I like backticks. You can use others too.
From the manpage :
NoClose / Close - Specifies whether the swallowed program in this button will be un-swallowed or closed when FvwmButtons exits cleanly. “NoClose” can be combined with “UseOld” to have windows survive a restart of the window manager. The default setting is “Close”.
NoHints / Hints - Specifies whether hints from the swallowed program in this button will be ignored or not, useful in forcing a window to resize itself to fit its button. The default value is “Hints”.
NoKill / Kill - Specifies whether the swallowed program will be closed by killing it or by sending a message to it. This can be useful in ending programs that doesn’t accept window manager protocol. The default value is “NoKill”. This has no effect if “NoClose” is specified.
NoRespawn / Respawn / SwallowNew - Specifies whether the swallowed program is to be respawned (restarted) if it dies. If “Respawn” is specified, the program is respawned using the original command. Use this option with care, the program might have a legitimate reason to die. If “SwallowNew” is given, the program is not respawned, but if a new window with the specified name appears, it is swallowed.
NoOld / UseOld - Specifies whether the button will try to swallow an existing window matching the hangon name before spawning one itself with command. The hangon string may contain wildcard characters (‘*’) that match any substring.The default value is “NoOld”. “UseOld” can be combined with “NoKill” to have windows survive a restart of the window manager. If you want FvwmButtons to swallow an old window, and not spawn one itself if failing, let the command be “Nop”:
morbusg, you’re my hero of the day no kidding
Thx a lot
morbusg:
I think that you want:
*ZConsole: (Swallow (UseOld, NoClose) "Console" `Exec xterm -name Console`)
as the format is:
Swallow [(flags)] hangon command
I like backticks. You can use others too.
Nah – as he has it there is fine – in fact the geometry of the button is important in this case. Note that I have not been able to reproduce this at all via the discussions we’ve had in IRC (which, I might point out, the Original Poster decided to conveniently fail to mention).
As for the quoting mechanisms, FVWM doesn’t care which you use, and places no restriction as to precedence.
– Thomas Adam
what ?
It works ! I’ve used NoKill instead of NoClose that’s the reason now everything is ok, I’ve also put the geometry back from the answer of morbusg and that’s clearly what I wanted.