feat(gaming): added fallback and more rules

This commit is contained in:
kenji
2026-07-02 12:27:19 -05:00
parent 87415c73bc
commit fd1bea0e6e
+18 -2
View File
@@ -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 (