Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Add Max Window Width for Tiled Windows

Open mike-lloyd03 opened this issue 2 years ago • 9 comments
trafficstars

I'm on an ultrawide monitor and it would be great to have an option to limit the width of a tiled window when it is the only one on a workspace. So Firefox doesn't take up the whole screen unnecessarily.

LeftWM has this feature and it's described here.

Thanks!

mike-lloyd03 avatar Apr 18 '23 01:04 mike-lloyd03

isn't that basically pseudo when only? :P That'd be scriptable

vaxerski avatar Apr 18 '23 10:04 vaxerski

Thanks. It appears from the documentation that pseudotiling is only be related to the Dwindle layout. Is this doable on the Master layout?

mike-lloyd03 avatar Apr 20 '23 22:04 mike-lloyd03

nope

vaxerski avatar Apr 20 '23 23:04 vaxerski

Is there any interest in adding such a feature? Having a single window full screen is unnecessary on an ultrawide and manually floating it and resizing it is inconvenient.

mike-lloyd03 avatar Apr 21 '23 04:04 mike-lloyd03

at the current moment, no. I have many other things to prioritize. Feel free to make a MR though

vaxerski avatar Apr 21 '23 11:04 vaxerski

Adding some interest in this feature. I would absolutely love it in Hyprland, as LeftWM is X11 and I would rather not have to switch back from a Wayland compositor

SkyLeite avatar Jul 13 '23 18:07 SkyLeite

Adding my interest too! this would be a great addition. Firefox fullscreened on a 21:9 doesn't look great, above all when websites are not centered (e.g. Duckduckgo and Google)

nmalo80 avatar Dec 12 '23 09:12 nmalo80

I have been playing around with Hyprland coming from sway and this is one of the main things that I miss. In sway, the settings relevant setting that I use to achieve this is smart_gaps inverse_outer it works a little different than how you have described (it is entirely possible to still have a window take up a wider area) but it solves the issue for me on a 32:9 monitor.

It is a part of the smart_gaps function which is usually used to remove gaps if there is only one window, however instead it does the inverse and adds the smart gaps only if there is a single window, I set this, then set the gaps horizontal to be 1/4 the window width. This makes sure that a single window is limited to roughly 16:9 and subsequent windows drop the gap.

I mention this, both to voice my support of such a feature, but also to provide a breadcrumb to someone who has the time and expertise to look through the code to look at implementing the feature. I would assume that being both wlroots based wayland window managers, this would be feasible to replicate?

lucidph3nx avatar Dec 13 '23 05:12 lucidph3nx

If that counts, I'm interested as well in this feature which LeftWM has. As mentioned above floating it and resizing it is inconvenient.

autom4il avatar Feb 22 '24 08:02 autom4il

this has been somewhat addressed recently through workspace selectors the following rule adds gaps on the sides when there's only one window in the workspace

workspace = w[t1], gapsout:10 400

some related discussions: https://github.com/hyprwm/Hyprland/issues/5312

thejch avatar Apr 12 '24 01:04 thejch

this has been somewhat addressed recently through workspace selectors the following rule adds gaps on the sides when there's only one window in the workspace

workspace = w[t1], gapsout:10 400

some related discussions: #5312

Hey, @thejch, I have tried your solution but I keep getting the error: Invalid workspace identifier found: gapsout:10 400. Do you have a guess to what the source of the error might be?

kauesena avatar Apr 13 '24 05:04 kauesena

Hey, @thejch, I have tried your solution but I keep getting the error: Invalid workspace identifier found: gapsout:10 400. Do you have a guess to what the source of the error might be?

You probably didnt update to the latest version

thejch avatar Apr 13 '24 05:04 thejch

You probably didnt update to the latest version

Oh, that must be it! I am using NixOS stable channel and the version I have is 0.32.3, while I notice now that the last release here is already 0.38.1. Thank you.

kauesena avatar Apr 13 '24 12:04 kauesena

this has been somewhat addressed recently through workspace selectors the following rule adds gaps on the sides when there's only one window in the workspace

workspace = w[t1], gapsout:10 400

some related discussions: #5312

This works perfectly for me. Thank you for following up. Closing.

mike-lloyd03 avatar Apr 17 '24 19:04 mike-lloyd03

Had a similar use case for the title of this thread, but the application is a little different than what's described in the post.

I use mdr to open markdown cheatsheets for hyprland, helix, yazi, bash aliases, etc. For all of these, I only need them to take up a quarter of the screen width at most. It would be cool to have the ability for mdr to open at 25% width in both master and dwindle layouts.

guttermonk avatar Aug 21 '24 00:08 guttermonk