Basically what I’m trying to do is to have a tabber start up at startup and swallow all subsequent rxvt’s I open. Restarting FVWM should reload the tabbers with the windows they had before.
I have this in .fvwm2rc
+ I NewTabber TabberBash
+ I NewTabber TabberBash2
+ I Module FvwmButtons
+ I Module FvwmEvent
+ I Module FvwmTabs
+ I exec usleep 5000000
+ I Function AddTabbers
+ I exec xsetroot -solid "goldenrod"
*FvwmTabs: showTitlebar false
*FvwmTabs: autoSwallowName bash
*FvwmTabs: fixedSizeTabs true
I get an error message pop up saying no such command as NewTabber with buttons Close, Close All Errors, and Exit Module. I put the usleep invocation in because I thought it might take a while for FvwmTabs to start up and create the command, but it makes no difference. What am I doing wrong?
(On a side note, I just restarted FVWM while writing this and Firefox lost its titlebar and became sticky, because that’s what was configured to happen for windows with titles beginning with FVWM).
I also have a NewTabber option in my root window menu which works with no problems.
usleep is idiotic where FVWM is concerned, see the Schedule command.
In light of 1., even using Schedule here is completely the wrong idea – it’s a bit like trying to hammer a nail into the wall using a sheet of paper — guess what happens?
The problem you’re seeing is that FvwmTabs is a module – when FVWM is instructed to restart, the modules lose their connection with FVWM until they’re loaded again. Since the windows from FvwmTabs will be reparented – it seems there is no “swallow existent” option in FvwmTabs. Oh well.
Then reorder your Style lines (go read my FVWM Tips thread whilst you’re at it.)
Okay, so fvwm didn’t wait for usleep to finish. Schedule does the job.
The FvwmTabs manpage suggests that it is possible to store what is in each tabber, e.g. the “*FvwmTabs: stateFile …” option. After having a look round I found undocumented functions like “SaveStateAndKill” referenced in the default configuration file FvwmTabs-DefaultSetup. Experimenting with this I got an error message complaining that the tabber was trying to swallow itself, so I had to delete the line saying to automatically swallow windows with the name bash, and this worked without errors. “SaveStateAndKill” needs to be put in ExitFunction for the tabbers to persist across restarts.
So it seems I can do what I wanted to do, but I will probably stick to using mrxvt for tabbed terminals. I don’t see why I should have to go digging in configuration files to find which undocumented function I need to use. I also don’t like the fact that I can’t have windows being opaque when they move if I want things to work properly, and I also find that there is a noticable fraction-of-a-second delay when focusing tabbers.