1c71784ac9
Refactor Hyprland configuration to: - Move Steam and Music from special workspaces to unique, named workspaces for better integration into the regular workflow. - Update Waybar's workspace module to correctly display icons for these new named workspaces and filter them out from the special workspaces module. - Implement a global blur effect for inactive windows, with a specific exception to keep Firefox windows fully opaque, enhancing focus on active content.
100 lines
2.4 KiB
Nix
100 lines
2.4 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"
|
|
"name:steam, monitor:0, default:true"
|
|
];
|
|
|
|
exec-once = [
|
|
# No longer launching steam on startup
|
|
# "[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"
|
|
"SUPER, A, Switch to Steam Workspace, workspace, name:steam"
|
|
];
|
|
|
|
windowrulev2 =
|
|
[
|
|
# --- STEAM LAUNCHER RULES ---
|
|
"workspace name:steam, class:^(steam)$"
|
|
# "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;
|
|
};
|
|
}
|