Files
nixos/modules/home/gaming.nix
T
kenji 13524322a2 revert(gaming): move steam back to special workspace
Reverts the recent change that moved Steam into a named workspace. Steam is now handled via a special workspace again. The Waybar module configuration has also been updated to reflect this change.
2026-03-15 09:22:00 -05:00

96 lines
2.1 KiB
Nix

{
pkgs,
lib,
myConfig,
...
}: let
games = [
"Deadlock"
"project8"
"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}"
];
manualGameRules = lib.flatten (map (
game:
(mkGameRules "title:^(${game})$")
++ (mkGameRules "class:^(${game})$")
)
games);
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 =
[
# --- STEAM LAUNCHER RULES ---
"workspace special:steam silent, class:^(steam)$"
"noinitialfocus, class:^(steam)$"
"suppressevent activate, class:^(steam)$"
]
# --- AUTO-DETECTED GAMES ---
++ (mkGameRules "class:^steam_app_\\d+$")
++ (mkGameRules "class:^(gamescope)$")
++ (mkGameRules "class:^(lutris)$")
++ (mkGameRules "class:^(heroic)$")
++ (mkGameRules "class:^wine-.*$")
++ (mkGameRules "title:^Wine .*$")
# --- MANUAL GAMES ---
++ manualGameRules
# --- STAYFOCUSED FOR SELECTED GAMES ---
++ stayFocusedRules;
};
}