Skip to content
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

Introduce a Tiling Mode #963

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Introduce a Tiling Mode #963

wants to merge 7 commits into from

Conversation

felix-andreas
Copy link
Member

Behavior

  1. Similar to other tiling window managers a Tiling-Mode can be activated by pressing SuperReturn: This will show a tile preview for the current window, which can then be moved using , wasd, hjkl or the mouse. Pressing Return or space will confirm the current preview and will tile the window accordingly. (Windows can also be moved between multiple monitors)
  2. In the future this mode could be complement with a Window-Selection-Mode: Here windows can be selected using the arrow keys (similar to the Multitasking view).
  3. The grid can be changed by pressing the number keys when in Tiling-Mode. For example pressing 32 will set a 3 by 2 grid.
  4. Inspired by the latest blog post I also added optional gaps, which can be toggled by pressing g when in tiling mode.
  5. The DragCtrl tile action of Ctrl-drag window tiling #595 is still available. But I consider to remove it as it just as convenient to press the SuperReturn shortcut.

@ToxicDragon
Copy link

ToxicDragon commented Nov 10, 2020

Please also consider to add the pictures of #595. Love the gaps option!

@felix-andreas felix-andreas mentioned this pull request May 12, 2021
@jeremypw
Copy link
Contributor

As the UX team is concerned that this is kind of a hack which is not true tiling, because Mutter does support tiling natively I am going to convert this to draft until the future of tiling in Mutter is clarified as until that point there is little point in reviewing this code.

@jeremypw jeremypw marked this pull request as draft June 23, 2021 17:16
@felix-andreas
Copy link
Member Author

felix-andreas commented Jun 23, 2021

The "hacky" part of this PR (the calculate_tile_rect function) is only 11 lines of code. Once mutter exposes an API for window tiling it should be pretty straightforward to replace this. IMO the limitation of the mutter API shouldn't be the reason to reject this PR. Of course there could be other valid reasons like that a tiling-mode could be incoherent with the existing ux of elementary or something else. But as far as I see it, the amount of technical debt this PR introduces is really minimal.

@felix-andreas
Copy link
Member Author

felix-andreas commented Jun 23, 2021

Another solution could be just implement "real tiling" in gala itself. A tiling API seems very high level to me, so might not even a good idea to implement something like this mutter. IMO core libraries like mutter should only do the heavy lifting and expose composable low level APIs. There are different ways to implement window tiling and implementing it in mutter takes some flexibility from the window managers built on top of it.

@jeremypw
Copy link
Contributor

Well, you need to get the UX team on board with the approach as this obviously has a major impact on UX.

@jeremypw
Copy link
Contributor

Its probably not a good time in the cycle to introduce a major change.

@felix-andreas
Copy link
Member Author

Agree, I didn't meant to push this in before the OS 6 release. Just in general: IMO when there are different ways to do something it shouldn't be implemented in the underlying library but in the application itself.

@ToxicDragon
Copy link

See also the Microsoft Powertoys FancyZones tool that makes it possible to configure a custom grid for tiling (also per monitor). Something similar were really great for your presented tiling mode solution aswell!

https://docs.microsoft.com/en-us/windows/powertoys/fancyzones

@ToxicDragon
Copy link

@andreasfelix is there a way to try your solution e.g. as an application on e.g. elemtsry OS 6? I'd really like to try it and give feedback. I have a 4K OLED 48" screen and therefore a custom grid layout would really be good for work productivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants