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?

> 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.

> Question 1 restated: can anyone suggest better approaches?

Not really.

> Question 2:
> 
> Another (somewhat unrelated) thing to note (from the ResizerFunc call
> above) is that I can't seem to find a way to pass the variables
> $[page.nx] and $[page.ny] to the script as anything else than "0 0" --
> they are maybe expanded at the time when the .fvwm2rc script is being
> evaluated?
> 
> So,  is there a way to ensure $[page.nx] and $[page.ny] are evaluated
> "lazily" at
> function call time, to have their correct values for example when I am
> "viewing page 1 7"?

Try doubling up the dollar signs:

$$[page.nx] $$[[page.ny]

The expansion rules happen each time a command is encountered,
effectively expanding forwards for each command.  In your function case,
there's about two or three commands which might have expanded them.
You'll need to experiment.

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)

Reply via email to