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"
|
"citadel"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Games that should have `stayfocused` applied (to avoid multi-monitor focus issues)
|
||||||
|
stayFocusedGames = [
|
||||||
|
"Deadlock"
|
||||||
|
"project8"
|
||||||
|
"citadel"
|
||||||
|
];
|
||||||
|
|
||||||
mkGameRules = selector: [
|
mkGameRules = selector: [
|
||||||
"monitor 0, ${selector}"
|
"monitor 0, ${selector}"
|
||||||
"workspace name:gaming, ${selector}"
|
"workspace name:gaming, ${selector}"
|
||||||
"fullscreen, ${selector}"
|
"fullscreen, ${selector}"
|
||||||
"immediate, ${selector}"
|
"immediate, ${selector}"
|
||||||
"stayfocused, ${selector}"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
manualGameRules = lib.flatten (map (
|
manualGameRules = lib.flatten (map (
|
||||||
@@ -24,6 +30,14 @@
|
|||||||
++ (mkGameRules "class:^(${game})$")
|
++ (mkGameRules "class:^(${game})$")
|
||||||
)
|
)
|
||||||
games);
|
games);
|
||||||
|
|
||||||
|
stayFocusedRules = lib.flatten (map (
|
||||||
|
game: [
|
||||||
|
"stayfocused, title:^(${game})$"
|
||||||
|
"stayfocused, class:^(${game})$"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
stayFocusedGames);
|
||||||
in {
|
in {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
protonup-qt
|
protonup-qt
|
||||||
@@ -74,6 +88,8 @@ in {
|
|||||||
++ (mkGameRules "class:^wine-.*$")
|
++ (mkGameRules "class:^wine-.*$")
|
||||||
++ (mkGameRules "title:^Wine .*$")
|
++ (mkGameRules "title:^Wine .*$")
|
||||||
# --- MANUAL GAMES ---
|
# --- MANUAL GAMES ---
|
||||||
++ manualGameRules;
|
++ manualGameRules
|
||||||
|
# --- STAYFOCUSED FOR SELECTED GAMES ---
|
||||||
|
++ stayFocusedRules;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user