PaperWM icon indicating copy to clipboard operation
PaperWM copied to clipboard

Add keybindings for moving window to left/right edge of monitor

Open Pajn opened this issue 2 years ago • 4 comments
trafficstars

Is your feature request related to a problem? Please describe. When not having enough windows to fill the monitor there is no way to move the window to another place than centered on the monitor without using the mouse. When having enough windows to fill the monitor it's possible to place the window with the keyboard, but it's more work than it needs to be as it requires focusing other windows so that the window you want to move goes outside the monitor on the edge you want to place it before then refocusing it.

Describe the solution you'd like Just that there is a "center window horizontally" keybinding, add the analogous keybindings "align window with monitor left edge" and "align window with monitor right edge"

Describe alternatives you've considered Haven't really considered alternatives, but since "center" already exist it feels a bit weird that other common placements are left out.

Additional context Example of the two intended outcomes: image image

Pajn avatar Oct 15 '23 18:10 Pajn

How would this do:

Currently we have two keybinds Switch to the first window and Switch to the last window that are pretty useful (mainly if you have quite few windows tiled and want to quickly go the first/last).

We could provide the behaviour you mentioned in this PR by do that behaviour for a single window (currently for single window those keybinds do nothing). This seems pretty natural as those keybinds kind of do that for multiple windows.

Thoughts?

jtaala avatar Oct 16 '23 14:10 jtaala

I feel like we shouldn't modify existing keybindings. Although in this case it would probably be fine. There is also a keybinding to center the window if I remember correctly.

Would Switch to the first window put the window on the left or right of workspace?

I think we are in general running out of sensible keys to put things on^^ But I think it would also be fine to have some features without default keybindings.

Lythenas avatar Oct 16 '23 16:10 Lythenas

Would Switch to the first window put the window on the left or right of workspace?

Well, similar to when you have lots of windows - the Switch to the first window would align on the left side (in the case you have one window).

jtaala avatar Oct 17 '23 10:10 jtaala

Seconding this idea, this would be super helpful. There could also be a setting to always open windows aligned to the left edge.

@Pajn Meanwhile, you can toggle centered focus mode then revert to default focus mode, this will put the single window on the left side 😄

madx avatar Nov 10 '23 16:11 madx