diff --git a/modules/home/gaming.nix b/modules/home/gaming.nix index a9feef0..351fedf 100644 --- a/modules/home/gaming.nix +++ b/modules/home/gaming.nix @@ -4,7 +4,7 @@ myConfig, ... }: let - gamingMonitor = "DP-1"; + gamingMonitor = myConfig.hyprland.mainMonitor; gaming-focus = pkgs.writeShellScriptBin "gaming-focus" '' # If already on gaming workspace on the gaming monitor, go back @@ -39,7 +39,23 @@ "match:${selector}, fullscreen on" "match:${selector}, immediate on" "match:${selector}, tile on" - "match:${selector}, workspace name:gaming" # <-- This was the missing rule + "match:${selector}, workspace name:gaming" + # 1. Flag as Gaming Content + # Optimizes rendering and lets your display hardware know it's a game + # (helps with VRR and color modes). + "match:${selector}, content game" + + # 2. XWayland Focus Fixes + # Forces XWayland games and launchers to receive input even if they + # incorrectly request not to. Fixes the classic "game launched but + # I can't click anything" issue. + "match:${selector}, allows_input on" + + # new: 0.54 fallback + "match:content game, monitor ${gamingMonitor}" + "match:content game, workspace name:gaming" + "match:content game, fullscreen on" + "match:content game, immediate on" ]; stayFocusedRules = lib.flatten (map (