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

[FancyZones] hotkey to grow/shrink to adjacent zone #1972

Closed
JeroenRombouts opened this issue Apr 7, 2020 · 31 comments
Closed

[FancyZones] hotkey to grow/shrink to adjacent zone #1972

JeroenRombouts opened this issue Apr 7, 2020 · 31 comments
Assignees
Labels
Cost-Medium Medium work item - 1-3 Days worth of work. FancyZones-Dragging&UI FancyZone dragging / interaction issue Idea-Enhancement New feature or request on an existing product Product-FancyZones Refers to the FancyZones PowerToy Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@JeroenRombouts
Copy link

Summary of the new feature/enhancement

using a hotkey + arrow combination for the direction, it should be possible to make a window grow or shrink

When you want to grow a window that you have snapped to a smaller zone, and you want to make it temporarily larger, you have to manually make it longer or wider. It would be easier if you could use a key+arrow combo to grow the window with the zone the arrow points to.

Of course, this should be restricted to zones that combine to rectangles.

I don't know if this matches your vision of the product, but this is what I miss in the current version. Or maybe this functionality already exists and I have missed it.

@crutkas crutkas added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something FancyZones-Dragging&UI FancyZone dragging / interaction issue Idea-Enhancement New feature or request on an existing product Product-FancyZones Refers to the FancyZones PowerToy labels Apr 10, 2020
@crutkas
Copy link
Member

crutkas commented Apr 10, 2020

what is the use case? we're thinking about resizing windows together if there is a shared border (#1193) but not this.

@crutkas crutkas added this to the Suggested Enhancements milestone Apr 10, 2020
@NSExceptional
Copy link

@crutkas I think he means he wants a way to expand a window to fill two or more zones.

For example, say you divide your screen into a 3x3 grid. FancyZones would be exponentially more powerful if you could choose multiple zones (forming a rectangle) to fit a window to.

You could have one window that spans the left 3 rows, the one that spans the top 2 rows of the middle column, one window on the bottom row of the middle column, and three windows in the last column.

Say you want to close everything in the middle column and want to make the window in the right column expand to fill ⅔ of the screen. You'd have to expand it by hand, currently.

@enricogior
Copy link
Contributor

@NSExceptional

FancyZones would be exponentially more powerful if you could choose multiple zones (forming a rectangle) to fit a window to.

629ba76

Currently it supports only dragging to snap to two zones, but it shouldn't be too complicated to support a shortcut key as well, the major problem is to find an available key combination :)

@JeroenRombouts
Copy link
Author

@crutkas I think he means he wants a way to expand a window to fill two or more zones.

For example, say you divide your screen into a 3x3 grid. FancyZones would be exponentially more powerful if you could choose multiple zones (forming a rectangle) to fit a window to.

You could have one window that spans the left 3 rows, the one that spans the top 2 rows of the middle column, one window on the bottom row of the middle column, and three windows in the last column.

Say you want to close everything in the middle column and want to make the window in the right column expand to fill ⅔ of the screen. You'd have to expand it by hand, currently.

Yes. This is what I mean. Thanks for helping me explain it.

I have used other window managers in the past and at least one of them had this functionality. It makes the Grid layout much more powerful. But it's not really easy to use if you have to use your mouse to manually resize.

Thanks @crutkas for at least considering it.

@coldshivery
Copy link

coldshivery commented Apr 14, 2020

  1. Lets keep it intuitive, same as you would hold shift now when dragging a window and snap into any zone. Simply hold shift while resizing a window to let it snap snap to any zones you hit causing the window to resize covering both zones.

  2. Alternatively another cool way would be when you hold shift now when dragging a window + hold right mouse button to mark any zones you want to use for that window. As if you where painting the zones the window should resize to and cover.

Method 2 would be allot faster and done in the same action you already need to do most of the time, and that is shift drag a window to pick a zone. Although when a window is already placed in a zone and you simply want to make it bigger and use the zone next to it method 1 would be preferable. Both are useful at different times.

@JeroenRombouts
Copy link
Author

  1. Lets keep it intuitive, same as you would hold shift now when dragging a window and snap into any zone. Simply hold shift while resizing a window to let it snap snap to any zones you hit causing the window to resize covering both zones.

Good idea, but that only works for people who haven't changed that setting. I changed it. Every time I move a window it will snap to the zone. Will that setting carry over?

  1. Alternatively another cool way would be when you hold shift now when dragging a window + hold right mouse button to mark any zones you want to use for that window. As if you where painting the zones the window should resize to and cover.

Method 2 would be allot faster and done in the same action you already need to do most of the time, and that is shift drag a window to pick a zone. Although when a window is already placed in a zone and you simply want to make it bigger and use the zone next to it method 1 would be preferable. Both are useful at different times.

My main use case would be to quickly grow and shrink a window when I want it too. Preferably without having to use the mouse. Your suggestion is very good for when you're position windows at the beginning of a task, though.

@coldshivery
Copy link

coldshivery commented Apr 14, 2020

My main use case would be to quickly grow and shrink a window when I want it too. Preferably without having to use the mouse. Your suggestion is very good for when you're position windows at the beginning of a task, though.

Hmm in order to quickly grow and shrink existing windows without a mouse would mean holding down a hotkey button and then use the arrow keys to grow it in the direction you want to. The question would remain, what hotkey would be a good default for that... Win + ALT + Arrow key perhaps.

@nikolaosginos
Copy link

  1. Lets keep it intuitive, same as you would hold shift now when dragging a window and snap into any zone. Simply hold shift while resizing a window to let it snap snap to any zones you hit causing the window to resize covering both zones.

Good idea, but that only works for people who haven't changed that setting. I changed it. Every time I move a window it will snap to the zone. Will that setting carry over?

I think it should carry over. Meaning that in your case it would automatically snap when resizing. For free resizing you would have to hold shift just like you have to hold shift for free moving. This would be consistent.

@yacoob
Copy link

yacoob commented May 17, 2020

+1 for this useful feature. As for the kebindings: have you thought about prefix shortcuts a'la screen/tmux/moom? Press a prefix, zones appear, use cursor keys + shift to select which zones it should extend to. With a 4x4 grid, this would give you quick access to half screen both ways and 3:1 side/top/bottom panels.

@enricogior enricogior changed the title Fancy Zones: hotkey to grow/shrink to adjacent zone [FancyZones] hotkey to grow/shrink to adjacent zone Jun 4, 2020
@ghost ghost added the Status-No recent activity no activity in the past 5 days when follow up's are needed label Jun 19, 2020
@ghost
Copy link

ghost commented Jun 19, 2020

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 5 days. It will be closed if no further activity occurs within 5 days of this comment.

@enricogior enricogior removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jun 20, 2020
@ghost ghost removed the Status-No recent activity no activity in the past 5 days when follow up's are needed label Jun 20, 2020
@enricogior enricogior removed this from the Suggested Enhancements milestone Sep 7, 2020
@enricogior enricogior added Status-In progress This issue or work-item is under development Cost-Medium Medium work item - 1-3 Days worth of work. labels Sep 7, 2020
@enricogior
Copy link
Contributor

This feature has the back-end already implemented (multiple zone selection using the mouse).
Adding support for keyboard should be fairly straightforward.

@dbartholomae
Copy link

Would love to see this happen in combination with Windows + Shift + Left/Right when Windows + Left/Right is already overwritten. Would be happy to provide a PR, this could take a while though as I neither know the codebase nor the language yet.

@ivan100sic
Copy link
Contributor

@dbartholomae
Both Win+Ctrl+Arrows and Win+Shift+Arrows are already used by Windows, and Win+Alt+Arrow is not detected, so we decided to use Ctrl+Win+Alt+arrows.

@dbartholomae
Copy link

But isn't Win+Arrows also used? I would only overwrite Win+Shift+Arrows when Win+Arrows is also overwritten.

@enricogior
Copy link
Contributor

@NSExceptional
Copy link

@enricogior how do you activate it?

@enricogior
Copy link
Contributor

@NSExceptional
I need to update the wiki, sorry about that.

win + ctrl + alt + arrows

I know is not a great combination but it was the only available at least until we will offer to choose a custom one.

@enricogior
Copy link
Contributor

@NSExceptional
I forgot to mention that you also need to turn on:

image

This requirement may be removed in the future.

@NSExceptional
Copy link

NSExceptional commented Sep 30, 2020

Ohhh that's nice! While activating the zone picker, you can just hit win+ctrl+alt and drag it from the zone you were hovering over to other zones and make it stretch to fill any rectangle you want.

As someone using the "hold a non primary mouse button while dragging the window" person, I would love to be able to just hold shift or some other key combo on top of that to begin selecting multiple zones, and simply release it if I change my mind. But this is fine until you get a custom shortcut option added as you said :)

Thanks so much! This is a game changer!

@enricogior
Copy link
Contributor

@NSExceptional
when dragging the window with the mouse you only need to press and hold the cntrl key to activate the multi zone selection.
Win + Alt + Cntrl are needed (along with the arrows), to expand the window to adjacent zones using just the keyboard.

@NSExceptional
Copy link

Oh neat, awesome

@JeroenRombouts
Copy link
Author

That looks great. Thanks for implementing this!

@enricogior
Copy link
Contributor

@dbartholomae
Copy link

Would you be open to a PR that allows to override the keys, e. g. to Windows+Shift+Arrows?

@enricogior
Copy link
Contributor

@dbartholomae
you mean "to provide an option to change the default shortcut"?

@roland-d
Copy link

roland-d commented Oct 1, 2020

Thank you for making Fancy Zones, after coming from a Mac where I use Magnet, this is really a very useful tool. If you wonder about shortcuts, this is how Magnet does it on the Mac: Not sure how feasible these options are on Windows.
image

(source: https://i0.wp.com/ackoy.com/wp-content/uploads/2018/10/Screen-Shot-2018-10-11-at-16.17.53.png?resize=416%2C610&ssl=1)

@crutkas
Copy link
Member

crutkas commented Oct 1, 2020

@roland-d magnet operates under a fixed style, we provide freedom of whatever you want. They are fundamentally different.

@W4RH4WK
Copy link

W4RH4WK commented Oct 1, 2020

Thank you very much for implementing this.

Would you be open to a PR that allows to override the keys, e. g. to Windows+Shift+Arrows?

I'd very much appreciate this. Win + Shift would be perfect for me. Fun fact, PowerToys' keyboard manager cannot be used to remap Win + Shift to Ctrl +Win + Alt

@crutkas
Copy link
Member

crutkas commented Oct 1, 2020

@W4RH4WK we don't allow modifier only shortcut remapping. I don't believe anyone has opened an ask (may be an open issue but i don't think there is) for that and we couldn't figure out a use case where someone would want this. If this is an ask, please file an issue.

@dbartholomae
Copy link

@dbartholomae
you mean "to provide an option to change the default shortcut"?

Yes. To be honest, I'm not sure if I will be able to do it, but for me the current keyboard shortcuts are more or less useless as pressing 4 keys is really unergonomical for task I do so often, so I still use the mouse, and I would be willing to dive a bit into the repo to see what I can do about it.

@enricogior
Copy link
Contributor

@dbartholomae
open a new issue as a feature request, then add a link to the new issue here so other users will find it.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cost-Medium Medium work item - 1-3 Days worth of work. FancyZones-Dragging&UI FancyZone dragging / interaction issue Idea-Enhancement New feature or request on an existing product Product-FancyZones Refers to the FancyZones PowerToy Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

No branches or pull requests