Gaming: HDT main window on its own scratch layer (SUPER+H)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8ac1d19cc6
commit
4fb1467e70
1 changed files with 27 additions and 0 deletions
|
|
@ -422,6 +422,19 @@ in
|
||||||
center = true,
|
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
|
-- Scratchpad terminal — same class-match + float-to-inset pattern as
|
||||||
-- Spotify above.
|
-- Spotify above.
|
||||||
hl.window_rule({
|
hl.window_rule({
|
||||||
|
|
@ -524,7 +537,21 @@ in
|
||||||
hl.bind(mod .. " + right", hl.dsp.focus({ direction = "right" }))
|
hl.bind(mod .. " + right", hl.dsp.focus({ direction = "right" }))
|
||||||
hl.bind(mod .. " + up", hl.dsp.focus({ direction = "up" }))
|
hl.bind(mod .. " + up", hl.dsp.focus({ direction = "up" }))
|
||||||
hl.bind(mod .. " + down", hl.dsp.focus({ direction = "down" }))
|
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 .. " + H", hl.dsp.focus({ direction = "left" }))
|
||||||
|
''}
|
||||||
hl.bind(mod .. " + K", hl.dsp.focus({ direction = "up" }))
|
hl.bind(mod .. " + K", hl.dsp.focus({ direction = "up" }))
|
||||||
hl.bind(mod .. " + J", hl.dsp.focus({ direction = "down" }))
|
hl.bind(mod .. " + J", hl.dsp.focus({ direction = "down" }))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue