hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
18.05k stars 753 forks source link

Bind or setting to precisely resize a window with a pointing device #6152

Open Atemo-C opened 1 month ago

Atemo-C commented 1 month ago

Description

As pointed out in this currently unanswered discussion, one can easily resize a window precisely with keyboard shortcuts, but, when grabbing on a window's sides, resizing with a pointing device like a mouse always acts on another axis that I do not want to be acted upon, as seen in this video.

https://private-user-images.githubusercontent.com/160250128/331737779-5101e38a-f604-4e71-ab31-d70597b09f59.mp4

I have looked at the wiki to see if I could change this behaviour, but to no avail.


This resizing behaviour is generally not the one I want nor expect, for it means that any imprecise movement with a pointing device like a mouse in an undesired axis will change the size of the tiles currently on the screen in an undesirable manner.

If possible, having a binding [key + mouse] would allow one to resize a window from its sides (here in white) in one axis, without affecting the others. This, ideally, could also or otherwise be done with a setting under hyprland.conf.

For example, on the image below, I could move the right side of L1 horizontally, and even if I moved my pointing device vertically during that horizontal resize, only the horizontal axis would be affected. Layout


Any thoughts on this?

vaxerski commented 1 month ago

sounds like a reasonable enhancement, but it's not possible atm. Unless you write it yourself or make a plugin, of course. MRs welcome

Atemo-C commented 1 month ago

Well, I might have to learn some programming for that, haha. Anyway, it is nice to at least know that this is not currently here, I thought for a moment that I had missed something obvious in some documentation somewhere, like I often happen to, but I am glad not to.

I hope someone with actual developing knowledge and free time will chime in to make a MR or plugin, and I will happily test it if needs be.

Thank you for the quick answer, as always.

Agent00Ming commented 1 month ago

I've got some work done on this, will post a PR when in a usable state.

Progress:

--- draft PR ---

Truenya commented 3 weeks ago

@Agent00Ming still working?

Agent00Ming commented 3 weeks ago

yeah. WIP here