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

Feature Request: Resizing on a predefined grid (in percentage values) #4275

Open
cookiengineer opened this issue Nov 28, 2020 · 3 comments
Open

Comments

@cookiengineer
Copy link

Hey,

first off I wanted to say that i3 is amazing! I've been using it for a couple months now and I love it. The behavior is very predictable and it allows me to increase my productivity a lot! Thank you for your work on this! :)

Today I took the time and wanted to figure out how I can increase my productivity a bit further. I noticed that when it comes to resizing, I usually prefer to have a grid of windows that have the same dimensions, so I am resizing windows with very looooong repeated keypresses until I'm at a specific window size again.

So I took a look at the codebase and the config schema. Currently, it seems that i3 supports only dimensions for resizes in px and pt, is that correct?

To take resizing a bit further, I wanted to ask whether it's possible to have something like a predefined grid that is defined in percentages (so it's easier to apply to different monitor resolutions if you have more than a single monitor), whereas the resize bindings would lead to resizing to the "next" or "prev" dimension that is defined in the grid.

Imagine a config for it like so:

mode "resize" {

    resize_grid_x = 100% 75% 66% 50% 33% 25%
    resize_grid_y = 100% 75% 50% 25%

    bindsym Left resize shrink grid x
    bindsym Right resize grow grid y
    (... etc...)

}

bindsym $mod+x resize grow grid x
bindsym $mod+Shift+x resize shrink grid x

bindsym $mod+y resize grow grid y
bindsym $mod+Shift+y resize shrink grid y

If there would be an additional way to trigger resizing on the grid via the predefined values for the current window, it would allow to very efficiently relayout the screen.

What do you think about this? Is this a good idea?

What would be the necessary steps to implement this?

@Airblader
Copy link
Member

I think something like this can be implemented externally using the IPC and would probably favor doing it that way.

@ghost
Copy link

ghost commented Nov 28, 2020 via email

@snprajwal
Copy link

You can try something like finding 0.25*<your monitor width> and putting that as a variable in your config. You can then use that in the resize commands.

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

No branches or pull requests

4 participants