From 4fb1467e70fa72bfa06c9ddcaeea5cb5445c33e4 Mon Sep 17 00:00:00 2001 From: rope Date: Thu, 8 Oct 2026 11:44:14 +0100 Subject: [PATCH] Gaming: HDT main window on its own scratch layer (SUPER+H) Co-Authored-By: Claude Opus 5.5 --- settings/hyprland.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index b4777a6..08a62ad 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -422,6 +422,19 @@ in center = true, }) + -- Hearthstone Deck Tracker's main window: its own special workspace + -- (SUPER+H), same float-to-inset as Spotify. Matched on title since + -- it shares steam_app_default with the game and Battle.net; the + -- overlay ("HearthstoneOverlay", no space) doesn't match. + hl.window_rule({ + name = "hdt-scratch", + match = { class = "^steam_app_(0|default)$", title = "^Hearthstone Deck Tracker" }, + workspace = "special:hdt silent", + float = true, + size = "monitor_w*0.6 monitor_h*0.8", + center = true, + }) + -- Scratchpad terminal — same class-match + float-to-inset pattern as -- Spotify above. hl.window_rule({ @@ -524,7 +537,21 @@ in hl.bind(mod .. " + right", hl.dsp.focus({ direction = "right" })) hl.bind(mod .. " + up", hl.dsp.focus({ direction = "up" })) hl.bind(mod .. " + down", hl.dsp.focus({ direction = "down" })) + ${if isGaming then '' + -- SUPER+H is HDT's scratch layer here; SUPER+left still focuses left. + -- toggle_scratchpad focuses by class, which HDT shares with the game. + hl.bind(mod .. " + H", function() + hl.dispatch(hl.dsp.workspace.toggle_special("hdt")) + if hl.get_active_special_workspace() then + for _, w in ipairs(hl.get_workspace_windows("special:hdt")) do + hl.dispatch(hl.dsp.focus({ window = w })) + break + end + end + end) + '' else '' hl.bind(mod .. " + H", hl.dsp.focus({ direction = "left" })) + ''} hl.bind(mod .. " + K", hl.dsp.focus({ direction = "up" })) hl.bind(mod .. " + J", hl.dsp.focus({ direction = "down" }))