You are not logged in.

#1 2025-09-20 01:01:06

TySpicer
Member
Registered: 2025-08-31
Posts: 138

[SOLVED] Hyprland - Symmetric window resizing

The Hyprland forum is probably better for this, but I figured I'd post here also to see if anyone here can help.

I originally got into Hyprland because of this video (and a few others): https://youtu.be/XK7gal3Wrtk?si=2hjQtnGS49H60lKf&t=52

About 52 seconds in, he switches a window to floating mode, and then resizes it. When resizing the window, it also moves the opposite corner so the center of the window stays the same. How would I implement this?

Last edited by TySpicer (2025-09-22 18:47:25)

Offline

#2 2025-09-20 17:37:44

tekstryder
Member
Registered: 2013-02-14
Posts: 451

Re: [SOLVED] Hyprland - Symmetric window resizing

TySpicer wrote:

The Hyprland forum is probably better for this..

xref: https://forum.hypr.land/t/symmetric-window-resizing/857

Offline

#3 2025-09-20 17:57:38

TySpicer
Member
Registered: 2025-08-31
Posts: 138

Re: [SOLVED] Hyprland - Symmetric window resizing

Yeah, I figured they Hyprland forum made sense, but I wasn't getting any responses there. Just checking if anyone knows here.

Offline

#4 2025-09-21 14:07:06

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,473

Re: [SOLVED] Hyprland - Symmetric window resizing

I imagine one would use windows rules.

I note that the floating windows always seem to be centered in that video.   I imagine they are using this parameter:
center ([opt])    If the window is floating, will center it on the monitor. Set opt to 1 to respect monitor reserved area.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2025-09-21 15:09:40

TySpicer
Member
Registered: 2025-08-31
Posts: 138

Re: [SOLVED] Hyprland - Symmetric window resizing

This seems like the right answer, but I'm having trouble understanding how to actually write the window rule. I tried this:

windowrule = center, floating:1

This didn't seem to do anything. Am I missing something in the window rule syntax?

Offline

#6 2025-09-21 15:17:07

tekstryder
Member
Registered: 2013-02-14
Posts: 451

Re: [SOLVED] Hyprland - Symmetric window resizing

Close.

windowrulev2 = center, floating:1

But, that doesn't give the "symmetric resizing" functionality, it just centers new floating windows.

Offline

#7 2025-09-21 15:22:02

TySpicer
Member
Registered: 2025-08-31
Posts: 138

Re: [SOLVED] Hyprland - Symmetric window resizing

Hmm, I guess that's not what I'm looking for then. It's still nice, though!

I changed the line, and it looks like it works for a single window, but not when there are multiple windows. When switching to floating, it seems to center the window relative to where it was, instead of relative to the monitor.

Edit - Turns out the centering window rule breaks the drop-down menus in Guitar Pro (running through Wine), so I decided to not go with this particular rule.

Last edited by TySpicer (2025-09-21 17:03:48)

Offline

#8 2025-09-22 15:31:47

tekstryder
Member
Registered: 2013-02-14
Posts: 451

Re: [SOLVED] Hyprland - Symmetric window resizing

Well you got your answer... pseudotile.

I've never once used the feature since building out my config and checking what it does, but indeed that's the resize behavior of a pseudotiled window.

Offline

#9 2025-09-22 18:47:03

TySpicer
Member
Registered: 2025-08-31
Posts: 138

Re: [SOLVED] Hyprland - Symmetric window resizing

Ah, interesting! It looks like my config already does this, it's just bound to a different key. On the other hand, it treats the window as tiled, and I was hoping this would work for floating windows.

So maybe it's not really possible for floating windows. A bit disappointing, but it's not a huge deal. It's not system-breaking, by any means!

I appreciate the help!

Offline

Board footer

Powered by FluxBB