Solved Fvwm: swallow xterm same instance in FvwmButtons

OsunSeyi

New Member


Messages: 6

Hi,
I'd like to swallow a xterm in FvwmButtons *DockXterm: (1x1, Swallow "xterm" `Exec xterm &`)

The construktion for toggeling the dock ist taken from the manpage:

Code:
    DestroyFunc ToggleDockXterm
    AddToFunc   ToggleDockXterm

    + I None (FvwmButtons DockXterm) Module FvwmButtons DockXterm
    + I Next (FvwmButtons DockXterm) Close

    Key F2 A A ToggleDockXterm
So far, so good, does work.
But, of cause, I allways get a new instance of xterm, but I would like so swallow allways the same instance.
Is there a way to realize this?


~~~~~~~~~~~~~~~~~
EDIT:
I found (1x1, Swallow (UseOld,NoKill) "xterm" `Exec xterm &`) without succes (my english is not 100% enough for the manpage, so I'm guessing sometimes). Perhaps the reason is + I Next (FvwmButtons DockXterm) Close in the Toggle-function...

EDIT 2:
There's a solution on the mangage: Toggling windows on and off
I tried this, but it will start a new instance of xterm...
 
OP
OP
O

OsunSeyi

New Member


Messages: 6

Found a solution good for me...
Code:
    DestroyFunc FvwmLX
    AddToFunc   FvwmLX

    + I Exec  exec pkill lxterminal
    + I Exec  exec lxterminal -T TERMINAL

    + I Wait  TERMINAL
    + I Next (TERMINAL) Move 1 3
    + I Next (TERMINAL) WindowStyle !Title, !Borders, !Handles

    Style "TERMINAL" NoIcon, WindowListSkip

    DestroyFunc IconLX
    AddToFunc   IconLX

    + I Next (TERMINAL) Iconify

    Key F2 A A  IconLX
exec pkill lxterminal is inserted to make shure, that only one instance is running (in case of restarting Fvwm).

Startup:

Code:
    DestroyFunc StartFunction
    AddToFunc   StartFunction

    + I Module FvwmButtons Dock

    + I FvwmLX
    + I IconLX
 
Top