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

resize dispatcher "shrink" and "grow" options #14

Open
hazycora opened this issue Aug 6, 2023 · 6 comments
Open

resize dispatcher "shrink" and "grow" options #14

hazycora opened this issue Aug 6, 2023 · 6 comments

Comments

@hazycora
Copy link

hazycora commented Aug 6, 2023

currently, the resize dispatcher always grows in the direction you request. This is inconvenient- it means to shrink a window you have to focus the window next to it and perform the action there. For floating windows, with this functionality there's no possible way to shrink them through the dispatcher (and, although this is probably an unrelated issue, resizing floating windows through the dispatcher seems to currently do nothing at all?)

i3 resolves this issue by having the "shrink" and "grow" options for the resize command. You can, for example, make pressing left always shrink the window, but right always grow it. This can, for windows on the right side of the screen, be the opposite of the way people expect it to work, but it's at least better to have this as an option than to be completely unable to shrink windows without the mouse.

@hazycora
Copy link
Author

hazycora commented Aug 6, 2023

I tried making a script to do this, using the existing "exact" option of the hyprland resize dispatcher, but I see that's unsupported so it's just straight up not possible at the moment </3

@aacebedo
Copy link

aacebedo commented Nov 4, 2023

Is there any work done on this? It is one of my major need for hyprland. If it is not the cas I think I'll take a look into it.

@Chr1s70ph
Copy link

Any news on this? This is the only reason I have for not using this actively right now.

@aacebedo
Copy link

aacebedo commented Dec 8, 2023

On my side, I did not have the time to take a look yet.

@outfoxxed
Copy link
Owner

Shouldn't be particularly hard, I just haven't had time for it either.

@m-bartlett
Copy link

I'm encountering this and I had originally opened an issue on Hyprland's repo but this only happens when I use the hy3 plugin, so below is the content from that issue in case it's helpful:

Issue description with video

Description

When using the dispatchers resizeactive and resizewindowpixel either as a bind or directly from hyprctl, it seems only values for the resizeparams argument to these dispatchers only actually change the window's size if the resulting resize is bigger. It also has the effect of appearing as if it will only resize if the expansion is towards the opposite end of the screen.

It also appears these dispatchers have no effect on floating windows.

hyprctrl simply outputs ok, and there is no errors in my logs.

Resizing the window using the mouse drag functionality works as expected, and is currently the only way I can resize windows to be smaller.

My keybinds for resizing windows to be smaller worked in previous versions of Hyprland. There doesn't seem to be anything in the docs for resizeparams that explain this behavior at least that I can see. However I fully respect the possibility I am misinterpreting this dispatcher's functionality or am not using it as intended.

In the bottom-most section is a screen capture I took of using the resizeactive dispatcher to successfully increase window size and unsuccessfully decrease it, only being able to shrink with the mouse drag resizing.

Possibly related to hyprwm/Hyprland#3704

How to reproduce

Simply try to resize a window with a relative position vector that is towards the side of the screen that the window is adjacent to. My demo video below shows what I mean, but for example if you have a terminal that's adjacent to the rightmost side of the screen and you execute hyprctl dispatch resizeactive 50 0 (i.e. resize the window 50 pixels to the right), you will observe the window does not change size.

Crash reports, logs, images, videos

resize.issue.demo.mp4

Here is the only portion of my config that uses the resizeactive dispatcher:

## Resize mode/submap
bind=SUPER,R,submap,resize
submap=resize
    unbind = ,down
    binde = , right, resizeactive,  100 0
    binde = , left,  resizeactive, -100 0
    binde = , down,  resizeactive,  0 100
    binde = , up,    resizeactive,  0 -100
    binde = SHIFT, right, resizeactive,  10 0
    binde = SHIFT, left,  resizeactive, -10 0
    binde = SHIFT, down,  resizeactive,  0 10
    binde = SHIFT, up,    resizeactive,  0 -10
    bind = , escape,submap,reset 
    bind = , return,submap,reset 
submap=reset

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

No branches or pull requests

5 participants