Make Wezterm behave like Ghostty's Quick Terminal, i.e. use a keybind to focus/hide a scratch terminal that always stays on top.
Keybind: Alt-`
- First press: Spawns a wezterm terminal with workspace
"_scratch"and focuses it in the middle of the screen. - Subsequent pressees: Hides the terminal if it is focused. Otherwise bring the terminal to the centre and focus.
Define a "_scratch" workspace (or any other name of your choice) so Wezterm can do special handling for this specific GUI window,
e.g. resize it to preference and always keep it above other apps.
See wezterm.lua below.
Hammerspoon is responsible for summoning and hiding the scratch terminal.
See hammerspoon.lua below.
If you have a tiling window manager like Aerospace, you will probably want to set an exception to not manage the scratch terminal, e.g.
[[on-window-detected]]
if.app-name-regex-substring = 'wezterm'
if.window-title-regex-substring = '_scratch'
run = 'layout floating'wezterm --version:20250511-222021-ad44b159- Hammerspoon: Version 1.0.0 (6864)
aerospace --version:0.18.5-Beta 4213dfd9d958dbfe3f801e07d7d5af53303baa75
-
I don't want to use Wezterm's multiplexer.
In the hammerspoon script, find the
wez.spawnmethod and remove--domain unix --attachfrom theargsvariable. In fact, play around with this part of the script and please let me know if there's a better way to interact withwezterm. -
I don't like the terminal in the center of the screen and prefer the curtain-like apperance of Quake mode.
Update your wezterm configuration to change how the window is positioned. See https://gist.github.com/xieve/fc67361a2a0cb8fc23ab8369a8fc1170 for example.
-
Are there other ways to achieve this result? How about on other platforms?
Yes, please see this discussion wezterm/wezterm#1751 and another relevant gist: https://gist.github.com/xieve/fc67361a2a0cb8fc23ab8369a8fc1170.

Hi @BitCalSaul, I no longer use this setup and have migrated to Ghostty, so apologies in advance if I can't offer too much help here.
I think the first thing I might recommend is using the nightly version of WezTerm (I found it pretty stable at the time). As you can see from the homebrew install, the last official release is almost 2 years old, and I recall several features/flags have been added/deprecated/renamed compared to the official docs. You can either build from source (what I did) or brew install wezterm@nightly (not sure if this is equivalent). I hope this helps with the path issue, but no promises.
Regarding Hammerspoon, I think I ended up using
io.popeninstead ofhs.executefor precisely the reason you state. I don't understand the internals too well, so most of it was trial and error. For finding the window/application, I recall Hammerspoon has a debug console where you can do some print debugging. You may have to play around with this and inspect the state offindWindowwhen it runs to find out why it's not finding your window. It's possibly related to the outdated wezterm version and/or the window title changing. See if the above comment helps