Basic keyboard quarter tiling
Basic quarter tiling support. Ctrl + Super + 1: Tile top left Ctrl + Super + 2: Tile top right Ctrl + Super + 3: Tile bottom left Ctrl + Super + 4: Tile bottom right
Partially Implements: #105 (only the keyboard support).
To my surprise, contrary to when using wmctrl, there was no issue with different shadows margins.
It doesn't transition (yet).
I think we'd want these to be bound to arrow keys by default if possible, so:
Ctrl+Super+Up+Left, Ctrl+Super+Up+Right, etc.
Good point. I'm having a bit of an issue with the keybindings though. With the keybindings:
<Super><Ctrl><Up>Left
<Super><Ctrl><Up>Right
<Super><Ctrl><Bottom>Left
<Super><Ctrl><Bottom>Right
only the bottom left + right work. It also blocks regular left and right tile.
With the keybindings:
<Super><Ctrl><Left>Up
<Super><Ctrl><Right>Up
<Super><Ctrl><Left>Bottom
<Super><Ctrl><Right>Bottom
- both Super+Ctrl+left and Super+Ctrl+left +Up and Super+Ctrl+left +Down triggers tiles top left.
- both Super+Ctrl+right and Super+Ctrl+right +Up and Super+Ctrl+right +Down triggers tile right.
Anyway, quite a mess. I could use some tips on how to get this working.
I’d prefer these but not sure it fixes your issue.
Move to the upper left — ⌃⌘← Move to the lower left — ⌃⇧⌘← Move to the upper right — ⌃⌘→ Move to the lower right — ⌃⇧⌘→
⌘ = super ⌃ = ctrl ? ⇧ = shift ?
Command-Control-Shift-
@jchannon I might be confused by your usage of ⌃ (which means ctrl right?), but isn't ⌃⌘←( Ctrl+Super+←) the same as the current tile left keyboard shortcut?
Quite possibly, those are the shortcuts I use on OSX for quarter tiling :)
This is awesome, but I worry that changing the key combinations to use two cursor keys at the same time would be problematic given that using one of those keys is already ingrained and as @peteruithoven has found requires some special handling of the keybindings.
I would propose something a little more visual and hopefully simpler to implement.
Ctrl+Super+u: Top Left Ctrl+Super+i: Top Right Ctrl+Super+j: Bottom Left Ctrl+Super+k: Bottom Right
This could later be suplemented with 3rd tiling...
Ctrl+Super+d: Left 3rd Ctrl+Super+f: Middle 3rd Ctrl+Super+g: Right 3rd
Ctrl+Super+e: Left 2 3rds Ctrl+Super+t: Right 3rds
I might be influenced by muscle memory, but I do honestly think it's less problematic.
One issue with using letters is that it's logical orientation breaks down on non Querty keyboards. I couldn't find statistics on keyboard layout popularity.
Hmm, yeah, that did occur to me.
I wonder if there is some sort of hardware code mapping that could be used more reliably than letters for saving to settings?
Any update to this, most distros have quarter tiling so it would be good to get it into elementary
Would be a terrific addition!
I hope this get added soon, its really useful productivity wise!
@donadigo nop it definitely wasn't. I just rarely use maximized / fullscreen windows. I added those allow resize / move checks because that seemed safe. But I changed it, it now also works for maximized and fullscreen windows.
I want to get feedback from @elementary/ux about the shortcuts before we merge
Is it possible to tell if a window is already half tiled? If so, maybe have it so you half tile first, then do up or down to go into quarter tiling?
@btkostner yes I can tell if it's tiled. What would that sequence of actions accomplish?
@peteruithoven So super+ctrl+left would left half tile it, then super+ctrl+top would quarter tile it to the upper left. Just a thought :thinking:
@btkostner Ah! Interesting idea! I've implemented the idea. Please let me know what you think.
So you’d have to do two sets of shortcuts to get it to tile to top left for example? Seems unproductive
On Thu, 4 Jul 2019 at 00:17, Peter Uithoven [email protected] wrote:
@btkostner https://github.com/btkostner Ah! Interesting idea! I've implemented the idea. Please let me know what you think.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/elementary/gala/pull/408?email_source=notifications&email_token=AAAZVJW2KLGBOJSV7ZV6IMTP5UXPJA5CNFSM4GC67FSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZF5BKI#issuecomment-508285097, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAZVJXVUGAX4X2TKHI2L5DP5UXPJANCNFSM4GC67FSA .
@jchannon The way I've seen it implemented is where you could (but don't have to) let go of left or right. But this way, you get instant feedback.
@peteruithoven Just tried it and it feels pretty cool :confetti_ball:. Two things might need to be changed, but I think @cassidyjames might have some insight to this. First being up + left should be the same thing as left + up if possible (not sure the technical constraints)... Second, I found myself wanting to move the whole window when it was already tiled. For instance, if I had a window in the upper left part of the screen and I did right, it would then be tiled in the upper right of the screen. This might be my tiling window manager brain, but might be something to try out...
First being up + left should be the same thing as left + up if possible (not sure the technical constraints)...
I think I've explained the technical limitation earlier. Properly implementing that keyboard shortcut simply is not supported. With the left/light > top/down I can use the tiling position as a workaround.
I thought I could maybe also register to Super+Ctrl+left/right and maybe do some kind of timeout where if Super+Ctrl+up/down and Super+Ctrl+left/right are pressed within a certain time I could trigger a quarter tile, but listening for left/right breaks the existing tile to side behaivior. I assume only one listener is allowed.
Second, I found myself wanting to move the whole window when it was already tiled. For instance, if I had a window in the upper left part of the screen and I did right, it would then be tiled in the upper right of the screen. This might be my tiling window manager brain, but might be something to try out...
Let's first get quarter tiling to work...
So a little summarizing update, beside tiling using Super+Ctrl+1/2/3/4 I've implemented @btkostner's suggestion. You can now quarter tile using a two step process:
- Tile window to left or right using Super+Ctrl+Left/Right
- Quarter tile window to top or bottom of that side using Super+Ctrl+Up/Down
Tiling to top or bottom half is also supported:
- Maximize window using Super+Up
- Tile to top or bottom half using: Super+Ctrl+Up/Down
And thanks @jlnr for the code review.
Can't wait to try the updated branch 💪
Another thought: Does a majority of people use keyboards with numpads? (Definitely not me, I'm a complete TKL fanatic 😬) Would 1, 3, 6, 9 be more intuitive shortcuts for corner tiling in that case? You could also use 4 and 6 for half-screen tiling, etc...
@jlnr @cassidyjames That's a pretty cool idea. I would wonder how many people use a 10 key with elementary. I personally do, and this solution sounds like the best for me, but I'm not sure that would work for everyone...
I've personally never had those, on any of the laptops I've owned. But sounds like someone could just remap the Super+Ctrl+1/2/3/4 and Super+Ctrl+Left shortcuts? You might miss something for the 2 and 8 though, something to directly tile something to the top or bottom half of the screen.
It's a pity it's not possible to bind multiple keyboard shortcuts to the same action, as far as I know.
I hope this makes it. I'm actually using a UHD 3440x1440 and three panels side by side would be awesome too. But yes, hope all the work on this ticket makes it
@btkostner About the numpad idea: Turns out Ubuntu MATE 19.10 just changed it's tiling shortcuts away from a numpad-based system (see "New Key-bindings"). I don't know what data they've based it on, but it seems numpads are not an overwhelming majority then.
How is this still not merged 😄 Looking at the issue list there is 10 issues about tiling. Do elementary not think tiling is important?
Because it's important to get it right - that's why there are several issues and even alternative PRs (#595). The underlying APIs are also a bit limited (keyboard shortcuts, mutter tiling). The best way to accelerate this is to provide a PR that has absolutely no glitches 😜