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 <noreply@anthropic.com>
This commit is contained in:
CLAUDE AI
2026-05-28 08:18:42 -05:00
committed by kenji
parent fe0d006f2e
commit f7ab887ed0
2 changed files with 2 additions and 34 deletions
+1 -1
View File
@@ -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
];
}
+1 -33
View File
@@ -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.