hyprwm / Hyprland

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

Hyprctl command to hide a monitor to a badly coded game or app #6491

Closed nonetrix closed 5 months ago

nonetrix commented 5 months ago

Description

A lot of games are terrible with multi monitor on Linux, even more so when you are potentially running Windows DWM in Wine -> XWayland -> Wayland a lot of odd bugs seem to crop up and even more so when the game is badly made and it's running though so many layers of abstraction. I think if there was a command like hyprctl hide-monitor <monitor ID> %command% it would make the gaming experience a lot better in many cases as a quick work around. I can use Hyprctl to disable a monitor completely, but that makes it obviously unusable. I just want the game to not know there is two monitors and only know there is one monitor, this would eliminate a lot of my need for Gamescope since I lot of times I am just using it to create a virtual display in effect to work around these issues not always but many times it's as simple as that and I can work around the issue by disabling one monitor but Gamescope is more convenient.

I'll give one example where this would be useful, Minecraft 1.8.9 last time I tried had a bug where it would render in 1920x1080 on my 1920x1200 with a blue bar at the bottom likely due to the game itself and fixed in newer versions but I've also had countless other issues. If I could just hide my monitor this could easily be worked around.

This could also allow for games that just launch on the currently focused monitor to be more programmatic, for example I only want to run Genshin Impact on my more color accurate but only 60Hz monitor since it doesn't allow for uncapped frame rate anyway without mods... MiHoYo could fix that with one intern making like 4 line change at most because it's already on iPad Pro version and available with mods that might randomly get you banned(I guess I'm already playing on Linux so already taking that risk, but still) and all the mods do is just edit like one value in the games memory. But my rant about that aside 🤦 I think this would be extremely useful functionality

vaxerski commented 5 months ago

can't do that with xwayland

nonetrix commented 5 months ago

Hm XWayland should add that then imo understandable