From f7ab887ed0b070503b061f1d6f944ae79a5f8c75 Mon Sep 17 00:00:00 2001 From: CLAUDE AI Date: Thu, 28 May 2026 08:18:42 -0500 Subject: [PATCH] revert(hypr): remove game-focus-watcher, restore steam rules Keep only DP-1 forcing changes: gamingMonitor variable, monitor rules for steam_app/mkGameRules, gaming-focus script, and SUPER+G binding. Remove game-focus-watcher (caused game freeze on workspace switch). Revert steam workspace rule back to title:Steam only. Revert ghostty exec-once order. Co-Authored-By: Claude Sonnet 4.6 --- apps/ghostty/default.nix | 2 +- modules/home/gaming.nix | 34 +--------------------------------- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/apps/ghostty/default.nix b/apps/ghostty/default.nix index 29fa7d6..bde2170 100644 --- a/apps/ghostty/default.nix +++ b/apps/ghostty/default.nix @@ -74,7 +74,7 @@ ]; wayland.windowManager.hyprland.settings.exec-once = [ - "[workspace 1] uwsm app -- ghostty -e bash -c 'fastfetch; exec $SHELL'" # TODO: must be xdg-terminal-exec, or default user terminal "[workspace special:preload silent] uwsm app -- xdg-terminal-exec" + "[workspace 1] uwsm app -- ghostty -e bash -c 'fastfetch; exec $SHELL'" # TODO: must be xdg-terminal-exec, or default user terminal ]; } diff --git a/modules/home/gaming.nix b/modules/home/gaming.nix index 9aeea37..944f1ce 100644 --- a/modules/home/gaming.nix +++ b/modules/home/gaming.nix @@ -25,34 +25,6 @@ fi ''; - game-focus-watcher = pkgs.writeShellScriptBin "game-focus-watcher" '' - handle() { - case $1 in - openwindow*) - data="''${1#openwindow>>}" - class=$(echo "$data" | cut -d',' -f3) - if [[ "$class" =~ ^steam_app_[0-9]+ ]] || \ - [[ "$class" == "gamescope" ]] || \ - [[ "$class" =~ ^wine- ]] || \ - [[ "$class" == "lutris" ]] || \ - [[ "$class" == "heroic" ]]; then - special=$(${pkgs.hyprland}/bin/hyprctl monitors -j | ${pkgs.jq}/bin/jq -r '.[] | select(.name == "${gamingMonitor}") | .specialWorkspace.name') - if [[ -n "$special" ]]; then - # Gaming workspace is already underneath — just close the special overlay - ${pkgs.hyprland}/bin/hyprctl --batch "dispatch focusmonitor ${gamingMonitor};dispatch togglespecialworkspace ''${special#special:}" - else - ${pkgs.hyprland}/bin/hyprctl --batch "dispatch focusmonitor ${gamingMonitor};dispatch workspace name:gaming" - fi - fi - ;; - esac - } - - ${pkgs.socat}/bin/socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do - handle "$line" - done - ''; - # Games that should have `stayfocused` applied (to avoid multi-monitor focus issues) stayFocusedGames = [ # "Deadlock" @@ -80,7 +52,6 @@ in { protontricks mangohud gaming-focus - game-focus-watcher # via ]; @@ -103,7 +74,6 @@ in { exec-once = [ "[workspace special:steam silent] uwsm app -- steam" - "game-focus-watcher" ]; bindd = [ @@ -128,9 +98,7 @@ in { # --- 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)$" - # All steam class windows go to special:steam (dialogs, store, friends, etc.) - # Game overrides below take precedence for actual games. - "workspace special:steam, class:^(steam)$" + "workspace special:steam, class:^(steam)$, title:^(Steam)$" # --- STEAM GAME OVERRIDES --- # Override the float for actual games and move them to the gaming workspace.