Skip to content

resize command: support floating windows #9

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

Open
nikitabobko opened this issue Oct 31, 2023 · 5 comments · May be fixed by #1156
Open

resize command: support floating windows #9

nikitabobko opened this issue Oct 31, 2023 · 5 comments · May be fixed by #1156
Labels
design-needed good-first-issue Easy to fix issues. Good for newcomers triaged The issue makes sense to maintainers

Comments

@nikitabobko
Copy link
Owner

Right now, the command does nothing when invoked on floating windows

nikitabobko added a commit that referenced this issue Oct 31, 2023
- ResizeCommand + floating windows -> #9
- start-at-login confirmed to work
jakenvac pushed a commit to jakenvac/AeroSpace that referenced this issue Aug 16, 2024
- ResizeCommand + floating windows -> nikitabobko#9
- start-at-login confirmed to work
@nikitabobko nikitabobko added good-first-issue Easy to fix issues. Good for newcomers design-needed labels Aug 18, 2024
@nikitabobko
Copy link
Owner Author

nikitabobko commented Aug 18, 2024

Open design question: what exactly should happen for resize smart?

@AlgusDark
Copy link

I would say that resize smart would resize width+height as the float flow means that it has only one container, the screen itself.

@hybridvision
Copy link

I came in search of this feature and am pleased to see it's already on the drawing board!

I agree with @AlgusDark, resize smart would make sense if it adjusted both width and height simultaneously (considering we already have dedicated width/height resize options).

It would also be great if the width change was evenly distributed in each direction – in other words, if you resize smart on a centred window, it would grow evenly in every direction, remaining centred on the screen.

Feature request

Floating windows would also benefit from the ability to set a specific size for both width and height (in fixed units or as a percentage). I guess this could already be done using two separate commands to set width and height individually but a single command might be nicer.

Rationale: When using very large screens (eg. 42" OLED), I find it useful to be able to float a window and set it to a "reasonable" size that I pre-define. Often I will also centre this window and black out the surrounds using https://github.com/dwarvesf/blurred in order to be able to focus on that. Depending on the window contents, it's nice to be able to tweak the size easily.

Anyway, just some extra thoughts! Thank you @nikitabobko for all your work on this project! 😎

@farzadmf
Copy link

The issue seems to be quite old, but I REALLY hope this gets implemented. Right now, I have to use Hammerspoon or something to resize the windows, but it's SUPER inconvenient.

I hope AeroSpace supports the floating window manipulation internally

@nikitabobko nikitabobko added the triaged The issue makes sense to maintainers label Oct 27, 2024
@MediosZ MediosZ linked a pull request Feb 28, 2025 that will close this issue
@MediosZ
Copy link
Contributor

MediosZ commented Feb 28, 2025

I’m introducing a new concept called the leading axis to handle resizing options like smart | smart-opposite. The leading axis is the longer axis of the floating window, like the X-axis if the width is greater than the height.

With resize width|height, the corresponding axis will be changed.
With resize smart, the leading axis will be changed.
And with ‘resize smart-opposite’, the non-leading axis will be changed.

All resize commands do not change the center and the aspect ratio of the floating window.
The boundaries are checked as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-needed good-first-issue Easy to fix issues. Good for newcomers triaged The issue makes sense to maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants