How to Obsessively Tune Wezterm
Posted2 months agoActive2 months ago
rashil2000.meTechstoryHigh profile
supportivepositive
Debate
20/100
WeztermTerminal EmulatorsCustomization
Key topics
Wezterm
Terminal Emulators
Customization
The post discusses how to customize WezTerm, a GPU-backed terminal emulator, and the discussion revolves around users sharing their experiences and tips for using WezTerm.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
51m
Peak period
52
0-12h
Avg / period
14
Comment distribution70 data points
Loading chart...
Based on 70 loaded comments
Key moments
- 01Story posted
Oct 29, 2025 at 3:39 PM EDT
2 months ago
Step 01 - 02First comment
Oct 29, 2025 at 4:31 PM EDT
51m after posting
Step 02 - 03Peak activity
52 comments in 0-12h
Hottest window of the conversation
Step 03 - 04Latest activity
Nov 3, 2025 at 9:24 AM EST
2 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45751995Type: storyLast synced: 11/20/2025, 5:39:21 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
Any of the ones you mentioned would probably work good with nix too. I don’t really care about the config being scriptable at all, it was just the first terminal that easily let me set all of the keyboard shortcuts I wanted, so I stuck with it.
I suppose I'm a bit of an extremist, though.
I put config in dir, launch app. App should look like config.
If it doesn't it's the app's fault.
There are a limited number of applications I tolerate this behaviour from, but not many.
But it's always better when the application itself is cross platform and uses just a single config file.
(Just setting all of the knobs on macOS is a massive hassle and only part of them can be automated in a deterministic way...)
For more and more of the cross-platform headaches, I've actually found myself treating the OS as more of a virtual host, and spending the plurality of my time configuring layers that run in it (modify .zshrc where it can do the work of iterm/wezterm, if it can be done in .emacs then do it there).
I get the feeling that I'm not far off shipping personal nix containers around, but there's still a little too much friction between having containers work and working on the OS itself.
I've been using it for years and didn't touch the templating until this spring actually, I just had if statements in my setup bash scripts =P
Wez is also cross platform so I get to use it on my Linux and Mac and my (Ugh) Windows work machine. Configuration being done in Lua is also something I quite like, but your mileage may vary on that one.
The thing that made me switch to Ghostty was the image support in wez didn't play well with tmux.
After testing wez, kitty, and Ghostty, I ended up going with Ghostty.
I do miss the idea of the whole lua config thing, but since I never did anything with it, I can't treat that as a practical concern.
[0] https://yazi-rs.github.io/features
It shocked me when I got back into playing with multiple machines after over a decade that this mostly still does not exist.
Instead we’re finally doing gpu rendering (which is amazing but … surprising for this to be the 2025 topic du jour?)
Wezterm runs everywhere, but lets me customise it once and keep that config uniform across all machines.
I can have a single config [0], wrap that in a nix expression [1] for anywhere that runs home-manager / NixOS and then also check it out and symlink on Windows machines as my portal to WSL. As my preferences change, my tooling stays consistent and familiar everywhere it's needed.
[0]: https://git.sr.ht/~kb/env/tree/main/item/dotfiles/wezterm.lu...
[1]: https://git.sr.ht/~kb/env/tree/main/item/programs/wezterm.ni...
I use Ghostty, but the same thing. I have a flake based setup, which means I have the same environment and programs across all my Macs, Linux machines and WSL terminals.
Takes me about 30 minutes to spin up a new Mac laptop, with 99% of all setup done, down to system preferences.
Linux (nixOS) a little longer because for a brand new machine I may need to do a little hardware specific bootstrapping, but if I’m paving the same machine about the same.
What killed iTerm2 for me was the fact that syncing settings between machines with chezmoi was next to impossible.
With Wezterm it's just Lua code, easy to diff and easy to apply.
- Access the scrollback buffer in neovim
- Access the last command output in neovim
- Animated cursor trails. It sounds dumb at first but I find that when sharing my screen, the cursor trails help other people keep track of my cursor when using neovim.
Here are my configs to quickly load @screen_scrollback or @last_cmd_output in neovim
map kitty_mod+z launch --stdin-source=@screen_scrollback --type=overlay /bin/zsh -c "nvim +$ +'nnoremap q ZQ'"
map kitty_mod+v launch --stdin-source=@last_cmd_output --type=overlay /bin/zsh -c "nvim +$ +'nnoremap q ZQ'"
Anecdotally, it feels the fastest to me. Also GPU-accelerated and super configurable. It's amazing how a guy (Mitchell Hashimoto)[2] leaves the company he co-founded before it was sold to IBM.
[1]: https://ghostty.org
[2]: https://www.youtube.com/watch?v=l_qY2p0OH9A
* They're very fast and the scrolling is very smooth, especially on a 120 Mhz (ProMotion) refresh rate on MacBook Pros.
* While TMUX runs on all of them, they have built-in multiplexing, so you terminal sessions without requiring TMUX.
* Super configurable and in some cases programable
* Excellent typeface support, including ligatures, which I liker
* A quality of life issue: you don't have to copy and paste URLs; you just right-click them in the terminal.
* Excellent typeface support
1. quick-select the output in the terminal (select files/paths, urls, etc and either copy or paste them at the cursor). This is very useful as you often don't have the foresight to pipe the command to pipe the output of the command to some selection mechanism and even placing text on the line-editor is not that easy by default.
2. view images (sixel or kitty protocol). This is pretty useful visual analog to cat that doesn't require opening another program and works over ssh. Also for video.
There are some other nice utilities for doing things like downloading files directly in the terminal (it2dl for iterm and kitten transfer for kitty).
kitty doesn't work out of the box on macos if I remember; you have to set configuration for option/command etc.
Because these terminals all use the Kitty protocol, you can finally detect a single ESC press without a timeout hack as well as use shift with arrow keys to do text selection.
The fact that it has taken until 2025 to be able to do something this basic is pathetic.
I don't really dump megabytes of text into the terminal, they might have an edge there? (I found that xterm is much faster than xfce4-terminal for that.)
https://blog.gripdev.xyz/2025/01/08/wezterm-easily-copy-text...
I had used urxvt forever before and the simple solution that works (even for ssh e.g.) is to ring the terminal bell, and urxvt just sets the window urgency hint upon that. I just do that in shell prompt unconditionally because if it's triggered in a focused window, then nothing happens. But if it's from a different workspace, I get this nice visual cue in my top bar for free.
But features like setting urgency isn't available in wezterm (understandable, as it's not a cross-platform thing). I could patch that in the source, but the Emacser in me chose to do something more unholy. By default Lua is started in safe mode, which means loading shared C module is forbidden. I disabled that, and now use a bunch of missing stuff written in Rust and Zig interfaced with cffi. Don't recall ever having a crash so I am surprised by some of the other comments.
I tried to use it on Windows as well but unfortunately the Antivirus freaks out on it. When I looked into it it was because of a small utility `strip-ansi-escapes` which is so simple that even I could see that it is a false positive. I tried to report it to Microsoft and other Antivirus companies with some success but in the end I gave up an this Sisyphus task.
Otherwise, it's awesome and my default terminal everywhere.
By default, WezTerm doesn't have a scrollbar, but you can easily enable it with:
But now you always have a scrollbar, just a big line on the side when there's no scrollback or you're in alternate screen mode. Horrible! So, here's an event handler that will automatically hide the scrollbar when not needed, giving it the same behavior as scrollbars in modern applications: And that kinda sums up the development philosophy of WezTerm. It has basically all the building blocks you'd ever need with nice APIs. It's set up quite usably by default, but anything that's missing you can probably implement yourself.It's just broken on KDE permanently I guess :/ There have beem tickets about it, and there is an AUR repo with a patch that used to fix it... but :/
Was already worried about the project given that it hasn't seen a new release in quite a long time. Got the feeling that the maintainer has mostly moved on.
Though for me, I only wanted the absolute bare minimum, which Alacritty covers. I was sad to lose ligatures, but Alacritty is stable and very fast.
Except it didn't run on my Windows VDI because "The OpenGL implementation is too old to work with glium". There's a config workaround here https://github.com/wezterm/wezterm/issues/1813 though. I don't know if this setting, or the implementation per se, makes rendering slow, but it's unusable for me. I can't wait a couple of seconds for every keystroke inside mc, rendering text is supposed to be lightning fast.
IIRC the maintainer was moving countries. Not saying that's the main or only reason, but it is likely a factor.
1. Custom escape sequences that trigger my own code. iTerm 2 and Kitty support this (Kitty calls them "kittens"), but I don't think any other terminal emulators do. WezTerm appears not to. User variables do come close, but are not quite the same, since a user variable is "declarative" and this behavior is "imperative".
2. Show timestamps for each scrollback line. This is a feature you don't miss until you need it, but I use it, for example, to match log output timestamps to the time I ran a command in mysql console on a remote server.
I don't really care about streaming 134.55 MB/s of text to my terminal emulator; I do care about features that make me productive.
On two occasions, dumping a real time data stream to std out has actually been a useful debugging technique for me, your domain might be quite different from mine, but I wouldn’t discount that performance is a feature in itself.
The first is hashing the working directory / (or remote hostname if I'm SSH'd into a host) to set tab title colors- much easier to find the right tab that way.
The second is writing a script to open tabs with in a certain order and set their titles. I don't use tmux, but this let's me recreate my preferred layout for projects quite easily.
See https://github.com/bbkane/dotfiles/tree/master/wezterm if any of this sounds useful to you!
It allows adding a custom background image, also transparent background, and I can toggle all of that via my custom shortcuts: Transparent on/off, background image on/off/rotate randomly.
It is such a joy to use and so beautiful. That plus neovim, yazi file browser, and lazygit: Dreamteam. Best dev environment I ever had.
1. When I split the terminal in 2 (left/right) and drag the slider around it glitches out and lags. On Linux at least. Like, I can release my mouse button and it'll just glitch back and forth between its old position and new position for a minute before settling down. (It also mangles any text that was already on the screen, but I'm guessing that's an artifact of the underlying shell, not wezterm)
2. I have a bunch of hyperlink regexes configured, but if there's a very long URL being displayed, WezTerm breaks the link. It's like it doesn't want to match URLs across multiple lines except the weird part is that the URL is literally only one line, it's WezTerms wrapping that makes it take multiple lines. So the regex is matching on displayed lines not on \ns, which is weird and breaks me constantly.
Other than those two things, it's pretty good.
Another issue I have with all terminals I've found so far is sometimes a program will just hang and no amount of Ctrl+C will kill it. And it drives me bonkers. I don't understand why the terminal can't take over and kill the entire shell and respawn it if it has to. In Wez I have to kill the pane or close the whole app. I tried digging in the Lua if I could "respawn pane" with a hotkey or something but I couldn't figure anything out that would keep my split-pane positioning.
I got used to it and cannot make the switch to Wezterm because everything is unreadable to me now.