-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic keyboard quarter tiling #408
base: main
Are you sure you want to change the base?
Conversation
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.
only the bottom left + right work. It also blocks regular left and right tile. With the keybindings:
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 — ⌃⌘← ⌘ = super 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 This could later be suplemented with 3rd tiling... Ctrl+Super+d: Left 3rd Ctrl+Super+e: Left 2 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 |
plugins/quartertiler/Main.vala
Outdated
if (!("tile-topleft" in settings.list_keys ())) { | ||
warning ("Quarter tiling key bindings not found"); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ricotz Thanks for the cleanup! But why remove this check? Without this, if a user where to try gala with this version and then downgrade he wouldn't be able to login anymore.
See: https://elementaryos.stackexchange.com/a/17582/3892
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gsettings schemas and keys are part of the API. We can't deal with not properly installed systems of all kinds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After I've experiencing suddenly not being able to login that seems scary / fragile, but yeah it probably doesn't make sense to make an exception for this property.
Would be a terrific addition! |
I hope this get added soon, its really useful productivity wise! |
cfd8af0
to
e1ebfe3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentional that you cannot tile a window that's already fully maximized? I would expect that to work.
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
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:
Tiling to top or bottom half is also supported:
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? 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is fine and does the job, but due to the technical limitations mentioned above, using the arrow keys feels a bit like a hack: cmd+ctrl+left+up only works if you press "left" before "up", etc.
Also, if you press cmd+ctrl+left, cmd+ctrl+down, cmd+ctrl+right, cmd+ctrl+down, you can see a ghost window floating in the wrong direction. I am not sure if this can be fixed easily.
I think it's up to @elementary/ux to decide whether this is polished enough. In any case, the number-based shortcuts feel solid.
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 😜 |
Please get this added! It's one of the main things I miss from macOS / SizeUp - not being able to fling windows around with super + numpad (quartered / halved / centred) Just make the keys re-definable in Keyboard Settings to keep everyone happy. |
@peteruithoven Converting to draft as there are conflicts and unresolved design issues, however there seems to be a lot of interest in it. |
Makes sense. I'd be down to update if there is at least a decent change this will be merged. |
For me, the initially proposed key combinations would make the most sense: Ctrl + Super + 1: Tile top left Are there any plans to implement such a feature? Would be nice of one of these would be discussed with the design team and eventually make it into a future release of gala. So far, these approaches seem the most promising: |
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).