Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does WezTerm support an equivalent of iTerm's "hotkey window"?

For those unfamiliar, that's a window tied to a show/hide keybinding which when shown floats above all other windows, making a terminal instantly available everywhere - a feature I could live without, but don't care to. I'd love to switch for all of WezTerm's other features, but without that it's simply a nonstarter for me.



Not out of the box, but I use Hammerspoon to implement a global hotkey to show WezTerm: https://github.com/jaminthorns/environment/blob/a609e81f3f41...

I don't have a keybinding to hide, but you could easily achieve that by inspecting the active window with `hs.window.focusedWindow()`/`hs.window.frontmostWindow()` and making the behavior conditional based on the application: https://www.hammerspoon.org/docs/hs.window.html#focusedWindo...

In WezTerm, you can control whether the terminal is always on top with the `ToggleAlwaysOnTop` action: https://wezfurlong.org/wezterm/config/lua/keyassignment/Togg...


Note that this does only the “show/hide’ the window part;

The iTerm2 hotkey window, is a floating window, which for example also works in a space with another Fullscreen window/app opened (without moving to another space.)


You can get the rest of the way there by combining the Hammerspoon method of launching with WezTerm's ToggleAlwaysOnTop feature. I use a similar method described here: https://github.com/wez/wezterm/issues/1751#issuecomment-2299...

You could probably even use Hammerspoon to initiate the keyboard shortcut if you didn't want to mark the window manually.


I expect that won't work on macOS, because an "Always On Top window" is not equal to a "floating window"...

It's described here: https://github.com/wez/wezterm/issues/1751#issuecomment-1973...


I was unfamiliar with Hammerspoon; to those like me, https://www.hammerspoon.org/



That is the first thing I configure in iTerm. To have it slide down like Quake terminal, and hide it from the dock


Yakuake is usually the first app I install on a fresh KDE system.


I do it using https://gist.github.com/meowtochondria/8b99b8fbf364eec41ef66... on my Debian based machine running X11. I've bound this script to a key as a global shortcut using OS provided facilities. See the comment on gist if you have a different setup and want to adapt it to your needs. Algo: 1. Find path to wezterm binary by looking at desktop file 2. Use pgrep to get pid of running binary from previous step. 3. If no window is running, launch desktop file using gio 4. If window is running, bring it to front using wmctrl


If you use X, you can use tdrop to do this with any window. I have it set up with kitty, pcmanfm, and emacs client.


https://github.com/noctuid/tdrop is really rather interesting.

Thank you.


X?


X11, the "old" [0] Linux graphics server.

---

[0] "old" because there's a new kid in town: wayland.


I’ve been reading about Wayland since around 2010 and it still isn’t ubiquitous, and still doesn’t work everywhere.

How long can we call something that’s at least 15 years old “the new kid”?


Wayland has arrived in lot of distros as default graphics server pretty recently, that's why it is OK to be called the new kid, IMO.


And a middle-age'd man named XFree86 lol.


Is the setting you're talking about the one under Settings>General>Startup>Window Restoration Policy>Only Restore Hotkey Window, or something else?


That's related to it, but the feature per se is more like a specially handled variety of iTerm's profiles. See https://iterm2.com/documentation-hotkey.html, section "Dedicated Hotkey Windows".


You can set this up very easily with Hammerspoon, and have it work with whichever terminal or app you want.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: