On Wed, Jul 8, 2009 at 11:00 PM, Kathryn Andersen<kat_li...@katspace.homelinux.org> wrote: > On Tue, Jul 07, 2009 at 02:07:31PM -0700, Jason Weber wrote: >> Anyhow, FvwmProxy won't create your layout, but if you stick them together, >> it will keep them stuck. If you have an idea on how proxy windows could >> be extended to better fit an efficient workflow, I'm ready to listen. > > I've been playing around with and looking at FvwmProxy and I love the > "isolate" function for "tabbing" windows. Alas, from looking at the > code, so far as I can see, the only way of dynamically adding or > removing a window from a group is by clicking on a proxy-window with a > mouse. That means that it isn't scriptable. Which means that I can't > use it in the way I want to. > > What I would *like* to do, is script (either with FvwmEvent or with a > module) so that when a new window appears, it can be automatically added > to an existing (isolated) group. That would put me on the way to > auto-tiling and auto-tabbing. > > What I would need, as far as I can see, would be ways to script the > following: > - create a new group, dynamically > - find out what groups are on the current page > - add a window, by window-id, to a group > - remove a window, by window-id, from a group > > If I could do that, then I could use a combination of FvwmProxy and > FvwmRearrange to do tabbed tiling for me. For example, for a 2-column > layout: > > If one window > maximize > If two windows > FvwmRearrange (two columns) > If three windows > FvwmProxy (Group Window #3 with Window #1) > FvwmProxy (Isolate Window #1's group) > FvwmRearrange (two columns) > > And so on. > > But right now, it looks like I can't do that. > > Kathryn Andersen
So you need more than the semi-static group definitions in the rc. I'm not familiar with the scripting tools, Perl I guess in this context, but I might presume it passes around the same sort of fvwm clauses that we see in a config files or that fvwm passes to and from the modules. So do we just need some more commands on FvwmProxy? Someone might have to help me out with the syntax. SendToModule FvwmProxy Join <group#> like sort of what the color buttons do internally. I think SendToModule gets a window context to know what to act on. I believe 'group 0' is no grouping. The named proxy "Group"s that show up in the rc are different from just being grouped. The naming setups in the rc file are used to do auto-grouping, but internally, grouped windows just happen to have an identical group index. The same index may be used on different pages since groups don't span multiple pages. When groups are moved to another page, it finds a free index there (note how the group's color might change). If these numbers get too confusing, perhaps we need an abstraction. SendToModule FvwmProxy Tag <tagstring> again, on a window context and, indirectly, targeting its group index. I'm not sure how return values work with scripting, but somehow we would also need a 'get tag' on a window context. Then you could also have SendToModule FvwmProxy Join <tagstring> I would wonder, if a tagged group is split up with the gui, who keeps the tag? I presume they have to be unique. -- Jason Weber