There’s a couple of features I’m used to from other WMs (openbox, icewm, cinnamon and xfce’s wms) that I need help setting up in fvwm.
First is my usual keybinds for moving windows left/right between desks, and moving with them. Currently I have:
Silent Key Right A CM GotoDesk 1 0 0 3
Silent Key Left A CM GotoDesk -1 0 0 3
Silent Key Right A CMS MovetoDesk 1 0 0 3
Silent Key Left A CMS MovetoDesk -1 0 0 3
The first two are for going one desk forward/back, the latter two are for moving a window forward/back. But with the latter two, my cursor turns into a plus symbol and waits til I “confirm” I guess to move the window. It also doesn’t move me to the desk I’ve moved the window to, which I would prefer.
Second, is there any way to set up the Alt key to:
- when held, allow left click and hold from anywhere within a window to move it
- when held, allow right click and hold to resize from the nearest border without actually having to mouse over onto the exact border itself
It’s a convenience I’m used to, and was wondering if it’s possible within FVWM or if there is something similar I could set up.
I’m about 40% into getting FVWM how I want it and figured I should ask about these things before I expend even more time doing the rest. Any help would be appreciated!
Alright, I kinda fixed the first issue by adding a function/FvwmEvent to focus the last window focused when return to a desk/page. Nothing being focused was why I had that plus symbol, it was wanting me to select a window. I used what was here: FVWM - ArchWiki
The second issue I kinda have fixed, I missed that you could use keyboard modifiers on mouse bindings so now I have
Mouse 1 W M Move
Mouse 3 W M Pick Resize direction SouthEast warptoborder SouthEast
which more or less does the same thing but slightly differently than I’m used to
You need to run the command in a window context, https://www.fvwm.org/Wiki/Config/FunctionContext/. If you don’t run this inside the window context, it requires you pick the window so it knows which one to move.
This can better be done by creating a function, so it gets run inside the window context. So in essence create a function like the following:
+ I MovetoDesk $0 0 0 3
Key Right A CMS WinToDesk 1
Key Left A CMS WinToDesk -1
You also don’t need
Silent, it really doesn’t do anything useful (it just suppresses warnings, which get sent to their own log now).
If the above doesn’t work, you may need to mess with the function context (it should be run in the context of the window), but you may want to add some conditionals so this only moves windows that you want to move, so here is another example:
+ I Current (!Sticky, CirculateHit) MovetoDesk $0 0 0 3
That should only move non sticky windows (since moving them won’t do anything) and ones that are in your CirculateHit list of windows (avoids moving panels and the likes).
Thanks, this works quite well! I added another line to move me to the desk the window moves to and does the trick!
+ I MovetoDesk $0 0 0 3
+ I GotoDesk $0 0 0 3
I just need to figure out how I might get it to maintain focus on the window moved as well, because it seems to be clashing with the FvwmEvent I set up to focus the last window focused on a desk when moving to it (on ClicktoFocus).
That said, I could probably just SloppyFocus. Only issue there is it can get a bit funky if the mouse falls onto another window (or no window) after calling the function once and moving to another desk. I’m just being really picky and could easily get away without “fixing” this, but I am curious if there was a way I could also tell the window to keep focus or if this is just gonna happen with SloppyFocus.