On 09/14/14 17:09, Thomas Adam wrote: > On Sun, Sep 14, 2014 at 05:00:21PM +0300, Tapio Luukkanen wrote: >> So ... I was experimenting with the PipeRead command to create a >> "smart" scroll-wheel-based non-interactive window resizing mechanism >> that would choose the edge where the resize occurs based on where the >> window midpoint is located on the screen (eventually using maybe other >> criteria as well). > > The closest you have now is the direction mechanism which will calculate > which border to warp to based on the pointer's position, relative to the > window which is to be resized. How is having a window's midpoint > position relative to the screen useful?
Well, maybe I'm too fixed in my ways. but I've not yet grown used to the tiling idiom. Normally, on any one page I have a large number of emacs and xterm windows open, side-by side or on top of each other, sometimes overlapping, sometimes not. Consider windows AA - HH: .AA.......... .AA.BBB...DD. .AA.BBBCC.DD. .EE.BBBCC.DD. .EE.FF.CC.HH. .EE.FF.GG.HH. Now, if the position (quadrant) of the window center is not taken into account, each window will grow downwards and to the right... and eventually out of view. For windows at the right and bottom halfs, shrinking their size would move them farther from the border. These behaviours annoy me. I also want to avoid manual resizing from the border. So, if I want to grow windows EE, FF, CC, GG, or HH vertically, I want them to grow "upwards in place", hence their bottom edge should stay fixed as also when shrinking their vertical size. When resizing DD or HH horizontally, their right edge needs to stay fixed. Other possibilities are possible -- maybe windows BB and FF should grow to the left and CC and GG to the right? Or maybe BB, CC, FF and GG should grow or shrink vertically with their midpoint staying in place? These behaviours might depend on resolution of current screen? Need to experiment more until this stops (or starts) making sense... >> To implement these new options KeepBottom and KeepRight for >> "ResizeMove" move_resize.c and geometry.c needed to be patched >> slightly (please contact if interested). > > By all means send them, although this sounds so niche that I'm dubious > as to their usefulness. The changed 3 files and the shell script will be for some time available at WWW-directory http://talux.dynalias.com/fvwm/ But IMO these changes are not yet mature enough to be merged into the main CVS. Especially, as this is the first time I'm tinkering with window management code, and to understand the workings of current logic lots of debugging printouts were added. The tentative changes in resize_move_window() and constrain_size() probably need redesign or at least very thorough testing. So... I fear the current state of these changes requires such cleanup and testing that would only distract anyone from other, more meaningfully productive work... >> Question 2: >> > Try doubling up the dollar signs: > > $$[page.nx] $$[[page.ny] This solved the problem. Thank you for your time and insights! Tapio Luukkanen