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

Per-Window Scaling #3861

Open
chaorace opened this issue Nov 15, 2023 · 14 comments
Open

Per-Window Scaling #3861

chaorace opened this issue Nov 15, 2023 · 14 comments
Labels
enhancement New feature or request

Comments

@chaorace
Copy link

Description

I'd like to be able to set custom scaling for specific windows. In other words: I'd like to be able to use different Wayland scaling multipliers between individual windows within the same workspace.

I feel that such a feature would improve workspace management when using applications which support Wayland scaling but otherwise lack a built-in "zoom" mechanism. The value-add would come from being able to fit otherwise unreasonably bulky applications into a given workspace layout without sacrificing unacceptable amounts of screen real-estate.

Off the top of my head, I can imagine the following possible implementations:

A. As a dispatcher (e.g.: scalewindow +0.2 / scalewindow exact 2.0) -- does the spec allow for changing scale on the fly?
B. As a window rule (e.g.: scale 2.0 / scale 0.5)

@chaorace chaorace added the enhancement New feature or request label Nov 15, 2023
@vaxerski
Copy link
Member

worth noting this is impossible for xwayland windows

@loki1368
Copy link

loki1368 commented Nov 17, 2023

I'd really like "PerWindow scaling" ability too. Because wlfreerdp works bad with global scaling(i have 1.75) and i need an option to drop scale to 1.0 for it(per-window or per-workspace).

FreeRDP/FreeRDP#7608

So, short answer: Can´t work that way, you always need FreeRDP without scale factor if you want the proper resolution for the RDP session.

@DrShadow34
Copy link

I second that, this feature would be nice to see. Right now I'm using some wacky stuff with script combined with keybinding hotkeys, to change scaling in config on the fly, or for xwindow I'm just using gamescope with custom resolution. All of this could be avoided if I could set for xwindow and certain apps own scaling.

@ildar
Copy link

ildar commented Dec 7, 2023

this FR is really critical for those using RDP.
I just have to manually set the scale globally for the moments I use RDP. 😞

@ildar
Copy link

ildar commented Dec 11, 2023

BTW, can a wayland application choose its scaling factor?

@vaxerski
Copy link
Member

yes

@1over137
Copy link
Contributor

1over137 commented Jan 8, 2024

One more potential use of this is to use the native fractional scaling present in some programs (firefox's layout.css.devPixelsPerPx) instead of Wayland's 2x then downscale method, which can save resources and produce clearer text.

@droc12345
Copy link

I started out, in wayland, using wayfire and there are 2 features that I really liked and used a fair amount,
One was being able to set alpha per window, binding to a key and I can make that work with hyprland.
The other was the built in zoom (magnification) where it would apply to a window or even the wallpaper.
That would be similar to what's being asked for here, and I'm not sure how easy it is to implement.

@1over137
Copy link
Contributor

1over137 commented Jan 8, 2024

@DrShadow34 Did changing the global scale work for all apps for you? For me, lots of applications (Qt and Alacritty) are still in the original scale and is stretched out to become blurry. I assume this is a bug(#4363) because if you move the window between monitors with different scaling they do get rescaled properly.

@DrShadow34
Copy link

@DrShadow34 Did changing the global scale work for all apps for you? For me, lots of applications (Qt and Alacritty) are still in the original scale and is stretched out to become blurry. I assume this is a bug(#4363) because if you move the window between monitors with different scaling they do get rescaled properly.

Yes, changing it globally works with Qt apps for me both ways. Most of blurry apps - only one that working thru xwayland, like steam, changing it scaling to 1 solves issue with blur. But have in mind, that I only have one monitor.

@ibrahimkettaneh
Copy link

This feature would be very helpful. The feature is so helpful that, as others have said, we have been using keybinds and scripts to adjust it on the fly. I used to have this keybind working, which somewhat addressed this need:

bind = $mainMod shift,		O,		exec, hyprctl keyword monitor "$(hyprctl monitors -j | jq -r '.[] | select(.focused = = true) | "\(.name), \(.width)x\(.height), \(.x)x\(.y),"')" "$(echo "$(hyprctl monitors -j | jq -r '.[] | select(.focused = = true) | "\(.scale)"') - 0.1" | bc)"
bind = $mainMod ctrl,		O,		exec, hyprctl keyword monitor $(hyprctl monitors -j | jq -r '.[] | select(.focused = = true) | "\(.name), \(.width)x\(.height), \(.x)x\(.y),"') $(echo "$(hyprctl monitors -j | jq -r '.[] | select(.focused = = true) | "\(.scale)"') + 0.1" | bc)

Though the issue is that now the other windows are not scaled in a readable or usable way.
It would be great if it were a hyprctl dispatcher.
Your continued work and efforts are sincerely appreciated.

@Hubro
Copy link

Hubro commented Feb 16, 2024

I would love this for screen sharing. It would be great to be able to blow a specific window up to 2x scaling, so viewers can read the text, without affecting the rest of the DE.

@simaotwx
Copy link

simaotwx commented Apr 2, 2024

My use case is that some apps, like electron apps, look kind of pixelated with a scale of 1.6 and I'd like to change that to make it look better but only for that window, because the rest works fine.

@nrvale0
Copy link

nrvale0 commented Oct 31, 2024

I started out, in wayland, using wayfire and there are 2 features that I really liked and used a fair amount, One was being able to set alpha per window, binding to a key and I can make that work with hyprland. The other was the built in zoom (magnification) where it would apply to a window or even the wallpaper. That would be similar to what's being asked for here, and I'm not sure how easy it is to implement.

@droc12345 Can you point me to how one might do this with Wayfire? I'm not seeing it in the docs but I'm curious to experience it. Thx.

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

No branches or pull requests