fix(gaming): now only stay focus on selected games

an issue in `Deadlock` does not focus its mouse even when the player is
not in the menu
This commit is contained in:
kenji
2026-03-14 07:54:19 -05:00
parent 4a9aa15b77
commit dca67e19bc
+18 -2
View File
@@ -10,12 +10,18 @@
"citadel"
];
# Games that should have `stayfocused` applied (to avoid multi-monitor focus issues)
stayFocusedGames = [
"Deadlock"
"project8"
"citadel"
];
mkGameRules = selector: [
"monitor 0, ${selector}"
"workspace name:gaming, ${selector}"
"fullscreen, ${selector}"
"immediate, ${selector}"
"stayfocused, ${selector}"
];
manualGameRules = lib.flatten (map (
@@ -24,6 +30,14 @@
++ (mkGameRules "class:^(${game})$")
)
games);
stayFocusedRules = lib.flatten (map (
game: [
"stayfocused, title:^(${game})$"
"stayfocused, class:^(${game})$"
]
)
stayFocusedGames);
in {
home.packages = with pkgs; [
protonup-qt
@@ -74,6 +88,8 @@ in {
++ (mkGameRules "class:^wine-.*$")
++ (mkGameRules "title:^Wine .*$")
# --- MANUAL GAMES ---
++ manualGameRules;
++ manualGameRules
# --- STAYFOCUSED FOR SELECTED GAMES ---
++ stayFocusedRules;
};
}