The one feature that sticks out as missing in OpenBox is the lack of the
'arrange windows' (resize and move windows to fill screen) command. Every other
window manager (except excessively minimalist BB) has this feature, and OpenBox
would really benefit from its inclusion. When implementing this feature,
handling of maximized (horizontally, vertically, and both) windows would be
tricky. Three options for behaviour would work well.
* In the first level, windows in any maximized state would not be resized (but
can be moved) in the process of trying to re-arrange the windows. If no space is
available for windows, or if less than a user-specified (by percent) area is
available, no action should take place.
* In the second level, windows that are only vertically or horizontally
maximized are not toggled away from that state, but are resized along the
resizable dimension (to give all windows equal area), and maximized windows are
untoggled from maximized state, and they (along with other non-maximized
windows) are resized to fill the remaining space. If both vertically and
horizontally maximized windows exist in the same workspace, the group with the
most windows (either vertical or horizontal maximization) remains maximized, and
the other group is untoggled and treated like un-maximized windows. If both
groups have equal numbers, the group with the highest windows keeps the
maximization toggle. (One method to determine which group has higher windows is
to sum up the positions of the windows from top to bottom and let the lower
totals have priority. (i.e. (from top to bottom) for windows like the following,
vertical maximized window (+1), normal window, horizontal maximized window (+3),
vertical maximized window (+4), horizontal max window (+5), vertical maximized
windows have a lower total (5) than horizontal maximized windows (7), giving
vertical. maximized windows priority)).
* In the third level, all windows are unmaximized and resized as equals.
In the latter two methods, all windows should be resized to establish equal area
for each window, and with the first method, all resizable windows should be
resized to establish equal area of the available area.
I know this is a big spec, but I tried to minimize the ambiguity of what I
described and do a little preliminary condition/error handling logic for you.
Rather than setting an option as to how the WM should always behave, I would
suggest the XML tag have a place to specify which the binding should activate
(since I want to use each of thsee in different situations).
Since the third level would be the easiest to implement, I would put that in
before the others so that command can be available as soon possible! :-D
I vote yes for this functionality. But I would like to have a 'arrange windows -> tile' option and also an 'arrange windows -> cacade' option. Again the easiest would be to implement third level (unmaximize and equal resize) and then arrange the windows in cascade. The window that had focus before the call to 'arrange windows' is made should (preferably) the first window.
It is now possible to do an action on all (or a subset of) windows - sequentially - using the "ForEach" action.
For a number of years I've been searching how I might "Cascade" windows, with most every reference saying it can't be done with openbox alone, and to use a "Tiling" application. Well...using a looping action/condition we can achieve a "cascade per monitor" keybind.
The nested loop structure is;
ForEach
Move each Window to Top Left
Lower
ForEach
Nudge All Windows
The result is a bit like the first action of a "Card Shuffle", and the nested loops will "Cascade" client windows.
With a few other "actions" we are able to maintain "Focus" or include "minimized/iconified" client windows. Un-iconifying or maximizing minimized windows requires the iconified window gets "Focus", so I am unable to maintain focus of the original window in this instance.
refer:
https://asharrem.github.io/cascade_rc.xml
Note - Feature Request:
<monitor> tag to support special values "current" or "other" - as it does with the <desktop> tag. This would negate the requirement to have a keybind per monitor.
Created attachment 3633 [details] Cascading Openbox Client Windows
Created attachment 3634 [details] Cascading Open Client Windows