PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

[FEATURE REQUEST] Ability to tile windows automatically

Open zeealeid opened this issue 4 years ago β€’ 31 comments

The "Window-Tiling" PowerToy

Here's an idea, add the ability to tile windows automatically. What I mean by that is when a window would open, it'll cover the whole screen but when another window would open, it'll cover the half of the screen automatically and the first app would also resize to the half of the screen. If the third window opens it'll open below the second window, resizing the second window to half vertically. And the new window would take place under the second window.

It has been done before in some Linux window managers like "i3". And a lot of people really appreciate the ability to do that.

Concept Shots

I've prepared some concept shots to show that:

Surface Book - 1 (24)

In the image above, a single window is opened. When the user wants open another window, they would need to click the start button or hit the start key on the keyboard. The Start Menu would be replaced with Power Run. The user would be able to select the desired app by typing it's name and selecting one of the results by using the arrow keys. Or just type the name and hit enter

Surface Book - 3 (9) Surface Book - 2 (17)

And when more than two apps are opened: Surface Book - 4 (4)

And when more than three apps are opened, the third app would be resized to half of it's size and the fourth window would appear in the empty space created by the third app.

There are better explanations of tiling window managers (than what I've done here) online

Conclusion

The window tiling feature is inspired by some window managers in Linux (like i3). I think it'll help with productivity stuff. I've posted these concept shots on Twitter and many people wanted this feature to be in PowerToys. Maybe integrate it in FancyZones by adding a toggle for this feature. What do you think? :)

zeealeid avatar May 05 '20 19:05 zeealeid

interesting idea. could do this with maybe a FZ tie in.

crutkas avatar May 05 '20 19:05 crutkas

I've worked on code that does something similar to this. Shouldn't be hard to implement.

@crutkas how do you mean by tie in? Are there plans to make FZ extensible?

JordanAnthonyKing avatar May 05 '20 20:05 JordanAnthonyKing

Why can’t it. We can add in what is needed, wonders of being in same project and OSS :)

crutkas avatar May 05 '20 21:05 crutkas

Right-clicking on the taskbar already allows for some kind of tiling. Though I never figured out how it works exactly and I don't think it's very good. It's also a bit similar to the "When I snap a window, show what I can snap next to it", that I always turn off within 2 minutes of a fresh install cause it feels kinda off. [maybe I never gave it a chance though, as it felt intrusive]

This looks much cooler, though.

DavidGretzschel avatar May 06 '20 11:05 DavidGretzschel

I see this as a combo of FancyZones and Window Walker. I'd say use Ctrl+Win then put a '+' in front of an app name that you want to open. Then it opens and snaps all along... or something like that :)

csm10495 avatar May 07 '20 03:05 csm10495

FancyZones sits in a weird place between a traditional tiling window manager and a regular floating window manager. I imagine the best way to implement such a feature without requiring FZ to have two distinct modes would be an option like Automatically add new windows that don't already belong to a zone to a new zone.

Really though FZ just needs an overhaul to its bindings and new features added like https://github.com/microsoft/PowerToys/issues/1776, to make quickly configuring the active layout easy for the user.

JordanAnthonyKing avatar May 09 '20 11:05 JordanAnthonyKing

I would absolutely love this. It's one of a few things I desperately miss from i3/awesome.

It would be nice to be able to create a series of configurations ('views' maybe) that you can apply to individual monitors. A shortcut to change a monitor from using "View 1" to using "View 2" would be good.

A view could contain settings such as "manual window snap" or "automatic window tiling" as well as the list of zones that we have at the moment.

An example using my setup:

I would love to be able to have a 'static' pair of zones on my portrait monitor, a single horizontal split, so that I can have Outlook on top and Slack below. But on my main landscape monitor, I'm always chopping and changing applications, so it would be awesome to have a zoneset configured that took advantage of auto tiling, so that if I only have my IDE open, it is full screen, but as soon as I open a terminal, the screen has a vertical split at 70/30 and the terminal takes up the full RHS of the screen (the 30%). If I add another terminal window, it should split the 30% zone in half horizontally, just like in @zeealeid screenshots above.

Bindings to assign windows to a specific zone would be welcome, as well as the option to designate a zone as a "master" zone, which means it never gets auto-split.

I think I'm getting into a laundry-list of features for FZ now but seeing this issue made me realise that whilst FZ is so many miles ahead of the default Windows wm, there is still stuff that I really miss from tiling WMs I used for many years on Linux.

ascii-soup avatar May 13 '20 08:05 ascii-soup

That idea seems like some kind of tiling window manager, like those that you can install in linux. It would be interesting, tbh.

Javiertis avatar Jun 02 '20 18:06 Javiertis

This would be SUPER helpful for me. Since windows doesn't support individual virtual desktops per monitor I always find myself trying to cram more onto each screen when I'm doing development stuff on Windows. The tiling aspect would also be extremely helpful with resizing, so they could all stay snapped together and resize at the same time.

aaronmhargrove avatar Jun 03 '20 02:06 aaronmhargrove

@JordanAnthonyKing

Are there plans to make FZ extensible?

No we don't have any plan to make it extensible. It would require to redesign and re-implement it from scratch, an overwhelming task if you ask me. Also, at first glance I don't see a clean architecture to make it extensible. The flow/auto-tile feature won't fit with the FancyZones architecture, and I doubt it would make sense to try to have both active at the same time. In my opinion, it would make more sense to implement the flow/auto-tile as a separate module and as an alternative to FancyZones.

enricogior avatar Jun 03 '20 06:06 enricogior

This would be an alright idea to add, although I do like fancy zones; but it does not take into consideration sub-windows from programs.

SheepDomination avatar Jun 03 '20 16:06 SheepDomination

I would love to see this feature. There is no tiling window manager for windows yet :/

As an inspiration the following projects could help:

Linux these onces are all pretty good, sadly there are no proper ports for windows. the dwm32 port is not bad but it lacks mutliwindow support and sees a few bugs

  • dwm => https://dwm.suckless.org/ (there is also a port by @martanne https://github.com/martanne/dwm-win32 and that one has seen some love by @prabirshrestha that got it working again https://github.com/prabirshrestha/dwm-win32)
  • i3 => https://i3wm.org/
  • awesomewm => https://awesomewm.org/

Windows

  • bug.n => https://github.com/fuhsjr00/bug.n by @fuhsjr00 (a very good and feature complete windows manager, the problem is the dependency on autohotkey and that it is slow compared to dwm32)
  • workspacer => https://www.workspacer.org/ a c# project by @rickbutton (did not see the same performance as in dwm-win32, faced a few issues

The window manager for linux are very good. i worked a lot with dwm. It is a reliable, near instant and configurable window manager. I did not see something that has the same experience in windows just yet.

I think a solution for windows could look like this:

  • The speed of dwm
  • configuration options dwm
  • UI proposed like @zeealeid

@zeealeid i love the integration of the taskbar. The idea of having the tiling behavior switch there is neat!!

PascalSenn avatar Jun 05 '20 04:06 PascalSenn

there is also this issue: #5

PascalSenn avatar Jun 06 '20 20:06 PascalSenn

This video by Pop!_OS/system76 is very similar to the concept: https://www.youtube.com/watch?v=-fltwBKsMY0

VincentJoshuaET avatar Jun 08 '20 13:06 VincentJoshuaET

Found two more Windows tilers:

  • https://github.com/ZaneA/HashTWM DWM port by @ZaneA
  • https://github.com/ritschmaster/b3 Still very hot πŸ”₯ made by @ritschmaster Maybe it's worth reaching out to @ritschmaster as this is still hot. Would be a nice addition to powertoys

PascalSenn avatar Jun 12 '20 21:06 PascalSenn

There is an old software called Plumb that managed to bring this feature to windows with almost-zero configuration/shortcuts (unlike linux tiling managers). The main issues: it is propietary and really old (it doesnt use the newer windows APIs and it doesn't detect UWP applications, doesnt support multiple monitors well, etc).

Having such a system integrated into PowerToys would be awesome, and I can contribute myself (I'm a software engineer) if you guide me on where/how to implement it.

The alternatives mentioned here heavily rely on shortcuts to be functional, while this one doesn't (+maintaining the posibility to have them).

I suggest you give Plumb a try to get a small idea of what can be implemented in this area :)

(these settings are ~how i would expect it to work by default) image

isc30 avatar Oct 05 '20 18:10 isc30

Found two active projects: https://github.com/TimUntersberger/nog https://github.com/rickbutton/workspacer

CavalloneChen avatar Mar 20 '21 01:03 CavalloneChen

A fully productivity-focused window manager in Windows 10 would be amazing to see. Something like a beginner-friendly i3.

destroyace avatar Mar 24 '21 03:03 destroyace

+1 For this. Want something similar to pop shell.

ejazahm3d avatar Apr 02 '21 07:04 ejazahm3d

Sounds like a great idea. Customizable keybindings would also be a good idea

Tesohh avatar May 27 '21 08:05 Tesohh

@Tesohh you might be interested in w32bindkeys.

@ejazahm3d If my i3 implementation does not fit your needs, you might be interested in WinWM.

ritschmaster avatar May 29 '21 09:05 ritschmaster

This would be a killer feature in terms of productivity. Forcing users to place the windows using mouse is far away from keyboard centric workflow and because of that, a strong drawback for powertoys adoption. I am using i3 on WSL2 until this feature is available.

verajosemanuel avatar Jun 30 '21 14:06 verajosemanuel

πŸ‘€ Does i3 work with Windows apps?

just1a-person avatar Jun 30 '21 15:06 just1a-person

no, just linux apps will work with i3 as this is inside WSL

verajosemanuel avatar Jul 16 '21 09:07 verajosemanuel

Looking forward to see dynamic tiling especially for very wide screens like 32:9 aspect ratio. Hope you'll get time and motivation to implement it! πŸ‘

cmprmsd avatar Sep 27 '21 19:09 cmprmsd

https://github.com/LGUG2Z/komorebi/ for anyone who wants a true bspwm/yabai-like tiling window management experience with a batteries-included config. πŸŽ‰

LGUG2Z avatar Oct 21 '21 01:10 LGUG2Z

+1 on this suggestion. I've been having a hard time finding a tiled window management solution for Windows that just works out of the box with the currently existing systems that Windows offers (I.E: Windows 11's Virtual Desktop system), and without needing to learn LUA or AutoHotkey scripting. I feel like a feature being added to FancyZones that would automate the work of creating zones and moving windows based on the number available on the current virtual desktop (Alongside swapping the window positions instead of just snapping to the right when "Override Windows Snap" is enabled) would help a lot for the workflow that I've gotten used to. Although likewise, I'd love to also see a feature that allows configuring Window rules (For example, moving any Steam process related windows to my Games virtual desktop, or moving Maya/Clip Studio to my art virtual desktop) automatically, as how the current way Virtual Desktops in Windows 11 are designed is in a suboptimal way that is mostly just useful to some people for hiding NFSW stuff or Minesweeper/Solitaire at work.

KingKrouch avatar Nov 25 '21 02:11 KingKrouch

Pop Shell is one of the few things keeping me on linux right now. Please have a look at its implementation of auto-tiling on Gnome.

rdong8 avatar Dec 08 '21 01:12 rdong8

Maybe you guys can check this out FancyWM uses it for automatic tiling (but FancyWM is proprietary, the dependencies isn't) https://github.com/FancyWM/winman-windows https://github.com/FancyWM/winman

pc-v2 avatar Jan 18 '22 05:01 pc-v2

Automatic tiling should take the orientation into consideration.

For example, if two applications are opened in landscape mode, then they would be tiled side to side (one app on left and another app on right). If the tablet orientation is changed from landscape to portrait, then they would be tiled top and bottom (one app on top and another app on bottom).

This can be done in two ways:

  1. There can be an option to preserve same tiling pattern when orientation changes (so that left-right tiling is converted to top-down tiling).
  2. There can be a preferred landscape tiling pattern, and a corresponding portrait tiling pattern. Here the user can specify which tiling pattern they prefer for each orientation.

Svk1190 avatar Sep 18 '22 00:09 Svk1190