Erm… I know there are quite a few ways to resize a window, but the one I’m after doesn’t involve a rodent. Also, I wouldn’t like any “interactivity”, I would just like to see it happend.
So, after some manualpage reading, I came up with:
AddToFunc FvwmResizeHorizontallyRight
+ I PipeRead "echo Resize $(($[desk.width] - $[w.width] + 3))p keep"
Key Right A M FvwmResizeHorizontallyRight
But I’d like to know if I’m trying to accomplish something Really Stupid ™ mathematically-wise?
Well, my goal was to largen the window in 3 pixel steps, but now it just largens a bit, and with next keypresses, it return to the size it was before the first press (and the counting of size is all wrong, I just realized ).
Don’t tell me there’s easier way?
I PipeRead “echo Resize $(($[cw.width] - 15))p keep”
AddToFunc FvwmResizeHorizontallyRight
I PipeRead “echo Resize $(($[cw.width] + 15))p keep”
AddToFunc FvwmResizeVerticallyUp
I PipeRead “echo Resize keep $(($[cw.height] - 15))p”
AddToFunc FvwmResizeVerticallyDown
I PipeRead “echo Resize keep $(($[cw.height] + 15))p”
[/code]
I tried with $[w.height/width] … didn’t work. Also if ±15 is changed to 5, it doesn’t work. I really, really don’t understand this.
I had to register just to thank you for the function (works perfectly).
Its the second time i take something really usefull (at least for me)from you.
The other is the clipboard function (very practical),for things like.
Download (tarballs,isos,porno not really etc …) to different folders.
Viewing a web picture with feh.
Setting (again with feh) a wallpaper direct from a web picture.
Editing with gimp an online image.
Listing Live Media with mplayer.
Opening a link with different browsers from Mutt,which i had to use urlview which was a PITA.
Opening a mailto with Mutt.
Paste the selecting text to vim.
Redirect output to different files and so on…
Sorry for posting something unrelated with the thread,but i had the need to thank him.
I wonder if “(Opaque)MoveThreshold” could be applicable here… just a thought. But as to why $[w.height/width] doesn’t work is because it’s nonsensical.
$[foo]
just does literal variable interpolation. You cannot do any form of evaluating inside the brackets. This is why PipeRead comes in useful.
Yep, I know (as you can see from the code). I was just too lazy to write “$[w.height] and $[w.width]”. My point was I tried those AND $[cw.height] and $[cw.width].
$[cw.foo] are the right ones to use in this instance. But it won’t work for all applications, such as Xterms, where the applications use a value larger than 1 for a resize-hint (symptomatic of “ResizeHints”.)
The only other suggestion I can see is if you use:
PipeRead '... xwininfo -id $[w.id] -size ....'
and pass the geometry values in, in units of increment, but that would be slow.