Hi. So I've using wmaker happily for several years, without any need for additional features. Before introducing "Maximize half*" I've been using my own script (first shell, than python) which utilize xdotool/wmctrl/xwininfo and I was happy with that. Partially, functionality I've been implemented was covered by mentioned "Maximize half" feature, but beyond that I've some other things like moving mouse pointer together with window, moving mouse pointer to specific display so that I can spawn another program without need of moving such around.
What is more important (to me) my script was using specific transitions between window state without using the mouse. Assigning some shortcut keys incredibly increased user experience with Window Maker. Assuming Super+left means "Maximize left" and Super+right means "Maximize right", following scenario was implemented: 1. If window is in unmaximized state, super+left will half-left-maximize it. 2. Further pressing super+left have no effect. 3. Pressing super+right maximize window in all directions 4. Pressing super+right again will half-right-maximize the window 5. Further pressing super+right have no effect. This scenario worked pretty well on single display/monitor environment. I've been lucky to have two additional displays for one existing in my notebook at work, which introduced new complexity to mine script. First issue was to detect where is the dock, and how user configured covering options. Next thing was to detect/calculate possible geometry for my simple scenario. There was even subtle issues with moving certain windows around, namely Libre Office and Virtual Box, since xdotool traded them differently for some reason and move them little to high so that it was impossible for reach title bar with mouse. Also certain windows sometimes have an issues with going to right place. I'm not sure what was the reason, but one of the possible cause was some race between windowmaker and xdotool. Last weekend I've spent some time and dig into wmaker sources and started to implement functionality from the script right into the code. What I've got so far is the first scenario spanned across multiple displays. So, assuming we have two different monitors witch the second one is right of the first the scenario is as follows: 1. If window is in unmaximized state on first display, super+left will half-left-maximize it. 2. Further pressing super+left have no effect. 3. Pressing super+right maximize window in all directions 4. Pressing super+right will half-right-maximize the window 5. Pressing super+right will send window to second display and maxmize it half-left 6. Pressing super+right maximize window in all directions 7. Pressing super+right will half-right-maximize the window 5. Further pressing super+right have no effect. It works with opposite direction the same way. For you guys, who, like me are visualizers, I've prepared some animgif with the idea[2] All the code have a status experimental, and I'm testing it "on production" ;) but for now it seems to work fine. You can find repository on github[1], although I can contribute back to wmaker-crm (using usual way) if such change isn't break anyone's workflow, but first I have to provide this functionality for all other directions. Also, I'm not exactly happy with the way for detecting existing displays - I'm creating new Point and check if head exists on specified location[3]. Is there a better way for getting the head (or null/-1) left-of/right-of current location? And what do you folks think about such change? [1] https://github.com/gryf/wmaker [2] http://i.imgsafe.org/e71e8949b9.gif [3] https://github.com/gryf/wmaker/blob/maximize-0.95.7/src/actions.c#L500 Roman Dobosz -- To unsubscribe, send mail to [email protected].
