microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
108.23k stars 6.39k forks source link

[FEATURE REQUEST] Ability to tile windows automatically #2694

Open zeealeid opened 4 years ago

zeealeid commented 4 years ago

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? :)

crutkas commented 4 years ago

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

JordanAnthonyKing commented 4 years ago

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?

crutkas commented 4 years ago

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

DavidGretzschel commented 4 years ago

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.

csm10495 commented 4 years ago

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 :)

JordanAnthonyKing commented 4 years ago

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.

ascii-soup commented 4 years ago

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.

Javiertis commented 4 years ago

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

aaronmhargrove commented 4 years ago

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.

enricogior commented 4 years ago

@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.

SheepDomination commented 4 years ago

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.

PascalSenn commented 4 years ago

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

Windows

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:

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

PascalSenn commented 4 years ago

there is also this issue: #5

VincentJoshuaET commented 4 years ago

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

PascalSenn commented 4 years ago

Found two more Windows tilers:

isc30 commented 3 years ago

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

CavalloneChen commented 3 years ago

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

destroyace commented 3 years ago

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

ejazahm3d commented 3 years ago

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

Tesohh commented 3 years ago

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

ritschmaster commented 3 years ago

@Tesohh you might be interested in w32bindkeys.

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

verajosemanuel commented 3 years ago

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.

just1a-person commented 3 years ago

👀 Does i3 work with Windows apps?

verajosemanuel commented 3 years ago

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

cmprmsd commented 2 years ago

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! 👍

LGUG2Z commented 2 years ago

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

KingKrouch commented 2 years ago

+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.

rdong8 commented 2 years ago

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.

pc-v2 commented 2 years ago

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

Svk1190 commented 1 year ago

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.

KiLLeRRaT commented 1 year ago

I've personally been using GlazeWM and it's been working very well for me. Actively developed at the moment: https://github.com/lars-berger/GlazeWM

FarisHijazi commented 1 year ago

still very interested in this feature!!! any updates?

burnthoney commented 1 year ago

This is something i'd be super hyped up for especially since it does increase productivity at least for me

betweenvenus commented 1 year ago

microsoft plz 🥺

antonioyon commented 1 year ago

There's a github project that provides this functionality, https://github.com/ianyh/Amethyst, but is buggy. I'd love to see a Microsoft native approach to this.

FarisHijazi commented 1 year ago

Can we just have a hotkey that randomly tiles windows using the existing fancy zones? Anything will do, but I'm tired of manually tiling things every time i turn on my pc.

antonioyon commented 1 year ago

Can we just have a hotkey that randomly tiles windows using the existing fancy zones? Anything will do, but I'm tired of manually tiling things every time i turn on my pc.

I concur. One of the powerful features of tiling windows is to facilitate a more keyboard-centric experience. Having to use a mouse to drag windows into the zones kind of defeats the point.

bhipple commented 1 year ago

If what you are looking for is "i3 for Windows", I recommend GlazeWM:

https://github.com/lars-berger/GlazeWM

I use this at work and barely notice any difference between it and i3 on Linux in my home setup. It comes as a single file exe that can be installed by the user without admin and has essentially all the same default keybindings/features as i3. The only real caveat is that you have to leave $mod as ALT, since WIN will open the start menu. But that's the default in i3 too so if you haven't remapped it then you're good to go, and if not it's a small adaptation.

It's really phenomenal and has made a huge difference to my quality of life. I hope it can help you too.

koppor commented 10 months ago

@FarisHijazi @anodynos

Can we just have a hotkey that randomly tiles windows using the existing fancy zones? Anything will do, but I'm tired of manually tiling things every time i turn on my pc.

How is this different to "Move newly created windows to the last known zone"? (https://learn.microsoft.com/en-us/windows/powertoys/fancyzones#settings) Does this work on startup?

FarisHijazi commented 10 months ago

@FarisHijazi @anodynos

Can we just have a hotkey that randomly tiles windows using the existing fancy zones? Anything will do, but I'm tired of manually tiling things every time i turn on my pc.

How is this different to "Move newly created windows to the last known zone"? (https://learn.microsoft.com/en-us/windows/powertoys/fancyzones#settings) Does this work on startup?

@koppor no it does not automatically tile existing windows, even on startup of powertoys

And the difference is

  1. i want to manually be able to trigger it
  2. I want it to fill up all zones using existing windows, even if n_zones > n_windows

Think of using a linux tiling window manager, and disabling then renabling the tiling mode, it will automatically tile everything and fill the screen(s)

That's what we want

SheepDomination commented 10 months ago

As I mentioned in this post. There are programs that use QT in Python but one cannot use zones to tear these windows out of the specified program and have fancy zones pick up those windows.

madslyng commented 5 months ago

As others have mentioned tiling window management is really about getting a more keyboard driven experience. Having to use a mouse is impractical for people who for instance use split keyboards, or for whatever other reason do not want to/can use a mouse.

If you were to consider that all your windows were a stack of windows. And every time you opened another window, it would be pushed onto the stack, then a new FZ mode could support taking that stack of windows and ensuring they were distributed on the screen following some pre-defined yet dynamic pattern. Those patterns could be very diverse. There is ample experience to draw on from i3, dwm, herbstluft and others.

If FZ were to support an API that made it possible to interact with windows programmatically and/or even in an event driven fashion, then the window management experience of FZ would become much more flexible and dynamic, instead of being forced into fixed layouts.

Adding freedom to the window management experience adds the ability for more creativity. FZ is already a wonderful tool for managing windows. This would be like super-charging that featureset.

mi3lix9 commented 2 months ago

I'd like to see automatic tailing management in Windows as I am using Hyprland currently. You could check also pop os tiling which has almost the same idea.

As all said, tiling window manger will be a good feature to improve productivity and wish to see it on powertoys.

b1scu1t commented 3 weeks ago

FancyWM is the best 'just works' dynamic tiling manager for Windows I've seen thus far, with GlazeWM being a close second.

It is licensed under GPLv2.