{ pkgs, lib, myConfig, ... }: let # Games that should have `stayfocused` applied (to avoid multi-monitor focus issues) stayFocusedGames = [ "Deadlock" "project8" "citadel" ]; mkGameRules = selector: [ "monitor 0, ${selector}" "fullscreen, ${selector}" "immediate, ${selector}" "tile, ${selector}" ]; stayFocusedRules = lib.flatten (map ( game: [ "stayfocused, title:^(${game})$" "stayfocused, class:^(${game})$" ] ) stayFocusedGames); in { home.packages = with pkgs; [ protonup-qt protontricks mangohud via ]; programs.mangohud = { enable = true; settings = { full = true; no_display = true; # Don't show by default (toggle with Shift+F12) cpu_temp = true; gpu_temp = true; ram = true; vram = true; }; }; wayland.windowManager.hyprland.settings = { workspace = [ "name:gaming, monitor:0, default:true" ]; exec-once = [ "[workspace special:steam silent] uwsm app -- steam" ]; bindd = [ "SUPER, A, Toggle Steam, togglespecialworkspace, steam" "SUPER SHIFT, A, Move to Steam Special Workspace, movetoworkspace, special:steam" "SUPER, G, Switch to Gaming Workspace, workspace, name:gaming" ]; windowrulev2 = [ "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" ] # Other auto-detected non-steam games ++ (mkGameRules "class:^(gamescope)$") ++ (mkGameRules "class:^(lutris)$") ++ (mkGameRules "class:^(heroic)$") ++ (mkGameRules "class:^wine-.*$") ++ (mkGameRules "title:^Wine .*$") # Stayfocused rules ++ stayFocusedRules; }; }