hyprland: ghostty scratchpad on special:scratch, SUPER+Return

This commit is contained in:
rope 2026-08-16 13:47:59 +01:00
parent 016b9bdd48
commit 11f7c14df3
2 changed files with 22 additions and 0 deletions

View file

@ -282,6 +282,10 @@ in
-- doing something else; the window rule above swallows it onto
-- special:music silently, so it never steals focus.
hl.exec_cmd("ghostty --title=spotify-player -e spotify_player")
-- Scratchpad terminal, same trick: parked on special:scratch at
-- login so SUPER+Return is always an instant toggle and the shell
-- keeps its history/cwd between peeks.
hl.exec_cmd("ghostty --title=scratchpad")
-- swayosd removed; volume/brightness OSD handled by quickshell
${lib.optionalString isMacbook ''hl.exec_cmd("hypridle")''}
end)
@ -347,6 +351,21 @@ in
center = true,
})
-- Scratchpad terminal same title-match + float-to-inset pattern as
-- spotify-player above.
hl.window_rule({
match = { title = "^scratchpad$" },
workspace = "special:scratch silent",
})
hl.window_rule({
name = "scratchpad-inset",
match = { title = "^scratchpad$" },
float = true,
size = "80% 80%",
center = true,
})
-- Games stall on other workspaces: no frame callbacks = no render =
-- game loop blocks. Keep them ticking in the background at
-- misc:render_unfocused_fps (15).
@ -400,6 +419,7 @@ in
hl.bind(mod .. " + P", hl.dsp.window.pseudo())
hl.bind(mod .. " + S", hl.dsp.layout("togglesplit"))
hl.bind(mod .. " + M", hl.dsp.workspace.toggle_special("music"))
hl.bind(mod .. " + Return", hl.dsp.workspace.toggle_special("scratch"))
-- Focus
hl.bind(mod .. " + left", hl.dsp.focus({ direction = "left" }))