Keep aspect ratio when resizing window removed in 0.55 Lua config? #14480
Unanswered
jemabaris
asked this question in
Bugs - Window management
Replies: 5 comments 3 replies
|
Yeah seems like code is still there but impossible to access from the lua api atm. |
0 replies
|
I made a little workaround using props for now (changed to your bind): -- Resize while keeping aspect ratio (temporarily)
hl.bind(mainMod .. " + ALT + mouse:273", function ()
hl.dispatch(hl.dsp.window.set_prop({ prop = "keep_aspect_ratio", value = "1" }))
hl.dispatch(hl.dsp.window.resize())
end, { mouse = true })
hl.bind(mainMod .. " + ALT + mouse:273", hl.dsp.window.set_prop({ prop = "keep_aspect_ratio", value = "false" }), { release = true, mouse = true })No idea if some of the |
1 reply
|
Very late (because my dumbass kept fucking up with the implementation/tests lmfao), but hyprland-git now supports (will be available in 0.55.4 if everything goes well) resizing windows with aspect ratio parameters like so: -- Normal resize (respects `keep_aspect_ratio` prop)
hl.bind(mainMod .. " + ALT + mouse:273", hl.dsp.window.resize(), { mouse = true })
-- Force aspect ratio (ignores `keep_aspect_ratio` prop)
hl.bind(mainMod .. " + ALT + mouse:273", hl.dsp.window.resize({ keep_aspect_ratio = true }), { mouse = true })
-- Force NO aspect ratio (ignores `keep_aspect_ratio` prop)
hl.bind(mainMod .. " + ALT + mouse:273", hl.dsp.window.resize({ keep_aspect_ratio = false }), { mouse = true })P.S.: I HATE NVIDIA, I had to install nouveau on a second computer because the open-source AND proprietary are soooo bad, it even literally kills itself... |
0 replies
2 replies
|
Hi @jemabaris, have you tried with the latest releases from v0.56.x containing commit a80e89f? If your issue is addressed, please mark as answered and close this discussion thread. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
With Hyprlang I could simply add the '1' keyword to constrain resizing a window with the mouse to it's initial aspect ratio:
bindm = $mainMod ALT, mouse:273, resizewindow 1I have tried all sorts of things to replicate this in Lua but couldn't make it work.
I also couldn't find anything about that in the wiki.
So is keep aspect ratio on resize removed, was I too blind to find it in the wiki, or is it a bug?
All reactions