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:
+18
-2
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user