On 25 Mar 2002 14:57:34 +0200, Tom Alsberg wrote:
>
> I just thought of something which could often be useful, and doesn't
> seem possible with FVWM currently... Grouping windows.
Although there is no such concept as grouping arbitrary windows, almost
every separate task is possible.
> The idea is that you could create a group and join some windows into
> it, maybe also assign a name to it for convenience, especially in
> configuration directives... Then you could perform some actions (like
> shading, moving, iconifying, sticking, etc.) on all the windows on the
> group at once,
If all windows have the same name or resource or class, it is possible.
Here is a menu from fvwm-themes, bound to window decorations:
DestroyMenu MenuFvwmWindowGroupOps
AddToMenu MenuFvwmWindowGroupOps "Resource Group Ops" Title
+ "&Iconify%menu/window-iconify.xpm%" Pick All ($r) Iconify on
+ "De&Iconify%menu/window-iconify.xpm%" Pick All ($r) Iconify off
+ "&Shade%menu/window-shade.xpm%" Pick All ($r) WindowShade on
+ "Un&Shade%menu/window-shade.xpm%" Pick All ($r) WindowShade off
+ "R&aise%menu/window-raise.xpm%" Pick All ($r) Raise
+ "Lo&wer%menu/window-lower.xpm%" Pick All ($r) Lower
+ "" Nop
+ "&Delete%menu/window-delete.xpm%" Pick All ($r) Delete
+ "&Close%menu/window-close.xpm%" Pick All ($r) Close
+ "Destroy%menu/window-destroy.xpm%" Pick All ($r) Destroy
+ "" Nop
+ "Quick Move To ...%menu/window-move.xpm%" Popup MenuFvwmWindowGroupQuickMove
> and maybe choose (maybe per action) that if an action
> would be performed on one window in the group, it will be applied to
> all of the windows in the group...
This is not easily possible. But if you speak about a group of transient
windows, several things are configurable, like what happens to other
windows in the group when one is raised/lowered or iconified.
> Maybe even assign styles to entire groups, etc...
Here is how to define the same style for arbitrary windows:
Style MyTerminalGroup ..., ..., ...
Style XTerm UseStyle MyTerminalGroup
Style Terminal UseStyle MyTerminalGroup # gnome-terminal
Style konsole UseStyle MyTerminalGroup
> Windows could be grouped in the configuration, and also
> perhaps interactively...
You may hack some function that assigns windows to groups interactively.
For example, when you press Ctrl-Shift-1 the current window is assigned to
group number 1, when you press Ctrl-Shift-9 - to group number 9. Then you
may bind a group menu to Ctrl-Alt-Shift-1 that asks which action to
perform on the group number 1 and does it for every window. I hope you can
write such function yourself. A hint - when you assign a window to group 1
you should do something like:
Key 1 A SC Pick AddWindowToGroup 1
Key 9 A SC Pick AddWindowToGroup 9
Key 1 A SCM PerformActionOnGroup1 Iconify # or better bind a menu
Key 9 A SCM PerformActionOnGroup9 Iconify # .. with many actions
DestroyFunc AddWindowToGroup
AddToFunc AddWindowToGroup
+ I AddToFunc PerformActionOnGroup$0 I WindowId $w $$$$0
+ I Exec xmessage "Window $n (id=$w) was added to group $0"
Just pay attention when you want variables to be expanded. Window id $w
should be expanded _before_ AddToFunc PerformActionOnGroupN is called.
One $0 should be expanded at definition time and one at run time. Two $$
are expanded by "+" and then $$0 is expanded to $0 by "AddToFunc".
> I think this could be often useful when working with many windows, if
> some are related then it can be logical to group them... Also
> especially when using applications which consist of several windows...
Application should group the windows itself. And some applications do
this using the standard way. Search for "WindowGroups" and "Transient
windows" in the man page.
> I don't yet know the FVWM code too well, so I don't know how hard it
> would be to implement it... But it's an idea for a feature which I'd
> be happy to have in FVWM...
Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sat Mar 30 2002 - 19:41:34 GMT