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

Exact fit snap window resize #3750

Closed
camsteffen opened this issue May 18, 2020 · 13 comments
Closed

Exact fit snap window resize #3750

camsteffen opened this issue May 18, 2020 · 13 comments

Comments

@camsteffen
Copy link

The Alacritty window should "snap-to-grid" so that the window is always exactly big enough to fit a grid of characters. This functionality is available in iTerm2 and Terminal on macOS (and probably others).

@chrisduerr
Copy link
Member

Such an option is available during window creation. Is your request to support that during resize?

While Alacritty might be able to attempt this, it's not possible on all platforms and it probably doesn't play well with those that don't.

@camsteffen
Copy link
Author

Yes, I mean during resize.

@kchibisov
Copy link
Member

In general such thing works only on stacking wms, and also you should be allowed to set size yourself. On tiling wms this code won't work and could lead to glitches and oob rendering, I guess.

@camsteffen
Copy link
Author

@kchibisov I would expect the exact-fit behavior to be disabled in those cases.

@kchibisov
Copy link
Member

The thing is that we don't know about such cases at all. We have no idea that we're on stacking or tiling wm. On macOS that works, but because macOS is stacking by default, I'm not sure that it'll work well if you decide put a tiling wm, like yabai on it. On Wayland/X11 it won't work as well.

@camsteffen
Copy link
Author

Can you detect when the user is resizing the window with the mouse?

@kchibisov
Copy link
Member

I can resize with a mouse in a tiling wm.

@camsteffen
Copy link
Author

Hmm okay. Well that's all I have to offer. 😄

@mitar
Copy link

mitar commented Sep 1, 2020

I think this is related to #1702. It seems tiling managers use information from the app about the grid to resize them. Not that the app has to do anything special about it. I would still like to see resizing by characters when app itself is resizing the app (and not the manager), I opened #4198 for something related.

@marioroy
Copy link

marioroy commented Sep 1, 2020

I can resize with a mouse in a tiling wm.

With regards to resizing, is it possible to expand/shrink the window only when the mouse pointer reach enough pixels to contain the full character width/height? Notice how Gnome Terminal expands/shrinks at character width/height intervals, not pixel.

@johnmmcgee
Copy link

johnmmcgee commented Oct 11, 2020

I agree that a snap to column would be a nice feature to be able to enable. I can understand not having it on by default, but however for those of us that would enjoy the feature that would be great.

I load tmux by default and i found that dynamically resizing windows in gnome gives me an odd padding around my statusbar that isnt that appealing.

@johnmmcgee
Copy link

Just to add to my comment, kitty has a similar option, resize_in_steps.

@chrisduerr
Copy link
Member

Duplicate of #388.

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

No branches or pull requests

6 participants