fix(gaming): revamped how steam and gaming works

1. hyprbars are now disabled for steam
2. set float for steam extended windows (e.g., settings, friends list)
3. fix game `properties` forced to `gaming` workspace
This commit is contained in:
kenji
2026-03-15 17:04:15 -05:00
parent 13524322a2
commit 2de8603b49
+26 -21
View File
@@ -4,12 +4,6 @@
myConfig,
...
}: let
games = [
"Deadlock"
"project8"
"citadel"
];
# Games that should have `stayfocused` applied (to avoid multi-monitor focus issues)
stayFocusedGames = [
"Deadlock"
@@ -19,18 +13,11 @@
mkGameRules = selector: [
"monitor 0, ${selector}"
"workspace name:gaming, ${selector}"
"fullscreen, ${selector}"
"immediate, ${selector}"
"tile, ${selector}"
];
manualGameRules = lib.flatten (map (
game:
(mkGameRules "title:^(${game})$")
++ (mkGameRules "class:^(${game})$")
)
games);
stayFocusedRules = lib.flatten (map (
game: [
"stayfocused, title:^(${game})$"
@@ -75,21 +62,39 @@ in {
windowrulev2 =
[
# --- STEAM LAUNCHER RULES ---
"workspace special:steam silent, class:^(steam)$"
"plugin:hyprbars:nobar, class:^(steam)$"
"plugin:hyprbars:nobar, class:^(steam_app_\\d+)$"
# --- STEAM GENERAL RULES ---
# Default ALL steam class windows to float. This catches all dialogs & properties windows.
"float, class:^(steam)$"
# Suppress focus stealing from dialogs/etc.
"noinitialfocus, class:^(steam)$"
"suppressevent activate, class:^(steam)$"
# --- STEAM CLIENT OVERRIDE ---
# Override the float for the main Steam client, tile it, and move it to the special workspace.
"tile, class:^(steam)$, title:^(Steam)$"
"workspace special:steam, class:^(steam)$, title:^(Steam)$"
# --- STEAM GAME OVERRIDES ---
# Override the float for actual games and move them to the gaming workspace.
# 1. Auto-detected steam_app games (like Deadlock).
"tile, class:^(steam_app_\\d+)$"
"workspace name:gaming, class:^(steam_app_\\d+)$"
# 2. Behavior-detected manual games (e.g. ARC Raiders).
# This moves any steam game to the gaming workspace and tiles it when it becomes fullscreen.
"tile, class:^(steam)$, fullscreen:1"
"workspace name:gaming, class:^(steam)$, fullscreen:1"
]
# --- AUTO-DETECTED GAMES ---
++ (mkGameRules "class:^steam_app_\\d+$")
# Other auto-detected non-steam games
++ (mkGameRules "class:^(gamescope)$")
++ (mkGameRules "class:^(lutris)$")
++ (mkGameRules "class:^(heroic)$")
++ (mkGameRules "class:^wine-.*$")
++ (mkGameRules "title:^Wine .*$")
# --- MANUAL GAMES ---
++ manualGameRules
# --- STAYFOCUSED FOR SELECTED GAMES ---
# Stayfocused rules
++ stayFocusedRules;
};
}