feat(hyprland): improve gaming experience and workspace navigation

- Implemented a modular gaming configuration with a local games list.
- Added dynamic window rules for games: monitor 0, dedicated 'gaming' workspace, fullscreen, immediate mode, and stayfocused.
- Enabled 'allow_tearing' to support immediate mode for reduced latency.
- Created a dedicated 'name:gaming' workspace bound to monitor 0 with a 'SUPER+G' shortcut.
- Enabled 'workspace_back_and_forth' for intuitive workspace toggling.
This commit is contained in:
kenji
2026-01-16 19:36:10 -06:00
parent f8e843ec94
commit 428488f11d
3 changed files with 55 additions and 16 deletions
+3
View File
@@ -1,6 +1,9 @@
{pkgs, ...}: {
# TODO: implement a way to show binds, preferably use vicinae.
wayland.windowManager.hyprland.settings = {
binds = {
workspace_back_and_forth = true;
};
bindel = [
", XF86MonBrightnessUp, exec, ddcutil setvcp 10 + 10"
", XF86MonBrightnessDown, exec, ddcutil setvcp 10 - 10"
+1
View File
@@ -4,6 +4,7 @@
gaps_in = 5;
gaps_out = 15;
layout = "dwindle";
allow_tearing = true;
};
decoration = {
rounding = 0;
+51 -16
View File
@@ -1,4 +1,30 @@
{pkgs, ...}: {
{
pkgs,
lib,
myConfig,
...
}: let
games = [
"Deadlock"
];
# Generate monitor rules for each game in the config
gameRules =
lib.flatten (map (game: [
"monitor 0, title:^(${game})$"
"workspace name:gaming, title:^(${game})$"
"fullscreen, title:^(${game})$"
"immediate, title:^(${game})$"
"stayfocused, title:^(${game})$"
"monitor 0, class:^(${game})$"
"workspace name:gaming, class:^(${game})$"
"fullscreen, class:^(${game})$"
"immediate, class:^(${game})$"
"stayfocused, class:^(${game})$"
])
games);
in {
home.packages = with pkgs; [
protonup-qt
protontricks
@@ -19,6 +45,10 @@
};
wayland.windowManager.hyprland.settings = {
workspace = [
"name:gaming, monitor:0, default:true"
];
exec-once = [
"[workspace special:steam silent] uwsm app -- steam"
];
@@ -26,24 +56,29 @@
bindd = [
"SUPER, T, Toggle Steam, togglespecialworkspace, steam"
"SUPER SHIFT, T, Move to Steam Special Workspace, movetoworkspace, special:steam"
"SUPER, G, Switch to Gaming Workspace, workspace, name:gaming"
];
windowrulev2 = [
# --- STEAM RULES ---
"workspace special:steam silent, class:^(steam)$"
"noinitialfocus, class:^(steam)$"
"suppressevent activate, class:^(steam)$"
windowrulev2 =
[
# --- STEAM RULES ---
"workspace special:steam silent, class:^(steam)$"
"noinitialfocus, class:^(steam)$"
"suppressevent activate, class:^(steam)$"
# --- GAMING RULES ---
"fullscreen, class:^steam_app_\d+$"
"monitor 0, class:^steam_app_\d+$"
"workspace 1, class:^steam_app_\d+$"
# --- GAMING RULES ---
"fullscreen, class:^steam_app_\d+$"
"monitor 0, class:^steam_app_\d+$"
"workspace name:gaming, class:^steam_app_\d+$"
"immediate, class:^steam_app_\d+$"
"stayfocused, class:^steam_app_\d+$"
"fullscreen, class:^(gamescope)$"
"fullscreen, class:^(lutris)$"
"fullscreen, class:^(heroic)$"
"fullscreen, class:^wine-.*$"
"fullscreen, title:^Wine .*$"
];
"fullscreen, class:^(gamescope)$"
"fullscreen, class:^(lutris)$"
"fullscreen, class:^(heroic)$"
"fullscreen, class:^wine-.*$"
"fullscreen, title:^Wine .*$"
]
++ gameRules;
};
}