August 12th, 2024

Okay, I Like WezTerm

Alex Plescan shares his transition from iTerm 2 to WezTerm, highlighting its Lua-based configuration, hot reloading feature, and extensive customization options, making it a flexible terminal emulator for macOS users.

Read original articleLink Icon
Okay, I Like WezTerm

Alex Plescan shares his experience transitioning from iTerm 2 to WezTerm, a terminal emulator that offers a text-based configuration system using Lua. Initially skeptical, he found WezTerm's powerful API and flexibility appealing, especially for sharing configurations across devices. Plescan highlights the ease of customizing the terminal's appearance, keybindings, and functionality through Lua scripts, which allow for complex configurations compared to traditional UI-based settings. He emphasizes the benefits of WezTerm's hot reloading feature, enabling instant updates to configurations without restarting the terminal. The post serves as a guide for beginners, detailing steps to install WezTerm, set up configurations, and customize the terminal's look and feel, including color schemes and fonts. Plescan also discusses the integration of system appearance changes and the use of events to enhance the terminal's functionality. Overall, he finds WezTerm to be a visually appealing and highly customizable terminal option, particularly for macOS users.

- Alex Plescan transitioned from iTerm 2 to WezTerm for its Lua-based configuration.

- WezTerm allows for complex configurations and instant updates through hot reloading.

- The terminal supports over 1,000 color schemes and dynamic theming based on system appearance.

- Plescan provides a guide for beginners on setting up and customizing WezTerm.

- The post highlights the flexibility and functionality of WezTerm's API for enhanced user experience.

Link Icon 70 comments
By @leblancfg - 5 months
Recently switched to WezTerm and I'm very happy. Was using kitty before that – loved the set up and simplicity coming from iTerm2. WezTerm is leaps and bounds better in terms of what comes out-of-the-box. My terminal config is short enough to sit all in one screen on my editor. After that, the terminal just... gets out of the way and I don't need to think about it.

But the straw that broke my back with using kitty was, I'd end up encountering issues or trying to recreate some of iTerm2's features, only to end up time and again on kitty's maintainer's terse and dismissive comments.

e.g. IIRC his answer to "How do I set up tmux with kitty?" was something like "Don't, tmux is dumb" and closing it. Eventually I gave up.

By @binary132 - 5 months
In my experience Wez has been shockingly responsive to GitHub issues and usually fixes things (if they’re actually wrong) within a day or two. I’ve only found one or two minor quibbles involving modifier keys over SSH and overall the functionality is basically perfect for my needs. Plus it’s nice and fast.

(Former avid Alacritty user but needed better modifier support for remote emacs.)

By @rob74 - 5 months
I originally installed WezTerm because I switched from Kubuntu to Ubuntu and wanted some of the features of Konsole (infinite scrollback, searching the scrollback) without actually installing Konsole (I know you can install it under Gnome too, but it just felt... wrong). And yes, it instantly grew on me, although (as I can see from this article) I have barely scratched the surface of its configurability. My only complaint is that its many features are not really discoverable. Sure, the documentation is really good, and the author is very engaged and helpful, but... one example: I looked up how to select large blocks of text using just the keyboard, I did it once, said to myself "I have to remember this!", then promptly forgot it and now I'm back to selecting text with the mouse like an absolute noob because all in all for the few times I do this it's faster than googling that documentation page again...

(in case you're wondering, the page I mean is https://wezfurlong.org/wezterm/copymode.html, not https://wezfurlong.org/wezterm/quickselect.html, which sounds like what I was looking for, but is something completely different - also very handy and a great idea, but not what I was after)

By @vladstudio - 5 months
Upvote! I tried Mac Terminal, iTerm2, Kitty, Warp, etc etc, and settled with WezTerm. Easy to configure, fast, looks nice. I created a theme for it too:

https://tiniri.vlad.studio/

By @linsomniac - 5 months
I've been using wezterm for around a year, and sponsoring Wez on github, and it's been a fantastic terminal and he's a great developer. One of the things I love most about it, which the article mentions it is not going into, is the quick copy and other copy modes. I use them All. The. Time. C-S-Space and type the letters that appear next to the item you want to copy.

One big use case I have is: mosh+tmux-like functionality from my macos laptop to my work Linux machine. I always have a session running so I can do things on my work machine from my Mac. It gives a re-connectable session plus panes and tabs so I can do work when I'm away from my desk. It's top notch.

By @bdhcuidbebe - 5 months
Whats not to like of wezterm??

My favorite and often overlooked feature is that wezterm is fully cross os, so if you work like me in Linux, macOS and Windows, then you can just learn wezterm and be done. I even share large parts of my terminal config across os:es.

By @dmd - 5 months
The one thing that keeps me on iTerm2 is Edit->Selection Respects Soft Boundaries.

"When enabled, vertical lines of pipe characters | will be interpreted as pane dividers (as in vim or emacs) and selection will wrap at them."

(For me, it's selecting text in irc.)

https://github.com/wez/wezterm/issues/596

By @steelbrain - 5 months
Going to echo some of the thoughts of sibling posters. I'd been an iTerm2 user since I first started using macOS nearly ten years ago.

I had really started to feel it slow down lately. It hit the breaking point when I was cmd-tab-ing and found myself waiting for more than a second just for the terminal to appear.

Looked around, evaluated a couple alternatives and none of them quite fit my taste. One terminal required an account/login to operate, which is a big no IMO, another was written in {Java,Type}Script so simple commands like `yes` would break it due to the async nature of streams in node.js.

I really like WezTerm so far. It's quite fast, very much configurable and comes with the theme I was configuring with iTerm2 out of the box (OneDark (base16)).

My only trouble with it was in the beginning when I had to add the configs for cmd-left and cmd-right in lua config, I really hoped they'd be in there with the defaults.

By @skim - 5 months
Wez is coming out with a book too on systems programming in Rust.

https://leanpub.com/sysprog

By @sodapopcan - 5 months
Nice write up, may try out WezTerm though I only just recently switched to Kitty and I don't like hopping around too often. Correction related to Kitty, though. It does not use either YAML or TOML, it has its own simple config DSL and is otherwise fully scriptable via Python.
By @alberth - 5 months
OT: I'm most excited by Ghostty (created by the founder of HashiCorp).

https://hachyderm.io/@mitchellh

By @bloopernova - 5 months
Oh, very cool that it uses Lua for its configuration. That opens up a massive potential for new behaviours and customization.

Emacs uses Lisp in a similar way. What other applications use a programming language for their configuration?

By @globular-toast - 5 months
A problem I have when I see stuff like this with tabbed interfaces, splitting etc. is it's all at the wrong level of abstraction and compensating for a hopelessly deficient window manager. If you use a window manager like sway then you can layout tabs, splits etc. to your heart's content for any type of window you like. You don't need a terminal emulator to do this for you.

Given that I do already use a window manager like sway, is there much else worthwhile compared to any other terminal emulator?

By @kccqzy - 5 months
At a previous employer (Google) I really enjoyed using iTerm2, especially its tmux integration (`tmux -CC attach`) and shell integration (the terminal being aware of shell prompts and shell commands and outputs so it can do something intelligent).

After switching employers I no longer have a Mac to run iTerm2 in. So I decided to simply reduce the number of apps I require by running my terminal inside Emacs. The emacs-libvterm project is excellent. These days I no longer need a terminal emulator app.

By @terraplura - 5 months
Been a long time user of Alacritty but recently switched to WezTerm. Set up was super quick and having graduated control over opacity and blur was brilliant. Also love that it supports Font Ligatures.

Btw one gotcha on macOS during setup is that the left Option/Alt key does not emit the usual special character mappings, but the right Option key does. You can configure that too!

Cheers Wez!

By @core_dumped - 5 months
I’m glad WezTerm is getting the attention it deserves. I just wish he’d change the icon though… it needs a facelift!
By @andrewfromx - 5 months
Things I noticed using it:

!= goes to weird ≠ utf8 char. I like != better!

Command-K clears the scroll back but NOT the screen.

Updates:

config.harfbuzz_features = {"calt=0", "clig=0", "liga=0"}

Command-L

By @zoidb - 5 months
Nice to see wezterm on the frontpage! For anyone giving it try beware that link detection doesn't work super well for links containing a `)` character which is something you run into frequently on markdown documents. More info in https://github.com/wez/wezterm/pull/4212 which has a workaround.
By @theusus - 5 months
Even though Wezterm has lots of options but it's slow compared to Kitty and maybe even Windows terminal
By @sidmitra - 5 months
https://wezfurlong.org/wezterm/colorschemes/

^ There's a host of built-in color schemes.

By @ishaanbahal - 5 months
Thank you for this write-up! Going to copy a couple of things to my config. TIL, Wezterm has a command palette.

Wezterm with Zellij becomes amazing with how it just simply gets out of the way, even lets you remove window decorations entirely. I've heard Wezterm has a multiplexer too, but just haven't tried it.

By @FL33TW00D - 5 months
WezTerm is just so much faster than iTerm2, wish I had switched sooner!

Video demonstrating the speedup: https://x.com/fleetwood___/status/1807772624518316495

By @selectnull - 5 months
Like a few people in this thread, I was a decade long user of iTerm2. Can't really remember what was the reason to research other terminals, but I did and among those I tried, WezTerm was the clear winner.

I vaguely remember my main requirement was being able to configure CMD+D and CMD+SHIFT+D as split panes vertically and horizontally as I wasn't willing to retrain my fingers to learn new keystrokes for that. Within a version of two after I switched (back then, those were weeks or less apart), all my complaints were resolved and I never looked back.

My config is fairly minimal, but perfect for my needs. What else can one want?

By @myst - 5 months
Am I a rare one being happy with Terminal.app?
By @aftbit - 5 months
I really _want_ to like WezTerm but the font rendering just looks bad compared to Alacritty. I understand that this is a very personal feeling and plenty of people like the WezTerm way better... but not me.

The author is not interested in trying to fix this issue, which is totally fine, as they point out font rendering is very subjective, but I'm also not willing to use a terminal that looks worse, even though I like many other things about it better.

https://github.com/wez/wezterm/issues/5331

By @roydivision - 5 months
I recently changed from Alacritty to WezTerm due to bugs in the former and I don't have any complaints so far. It is part of my daily professional workflow, works well with Tmux, under WSL. Great piece of software.
By @kokada - 5 months
I also recently switched to WezTerm because it is the only terminal that seems to work cross-platform that is also well supported in Nix/nixpkgs. Before I was using Kitty in NixOS and iTerm2 in macOS, but having one configuration for both OS is good.

P.S.: I am temporary back to Kitty in NixOS because I recently switched from Sway to Hyprland and the current release of WezTerm seems to be having some issues in Hyprland. But will switch back once this issue is solved, I know it is fixed in the main branch for example, but I would prefer to use nixpkgs cache instead of building it from source.

By @alskdj21 - 5 months
As a neovim user, wezterm's lua config was a welcome surprise. Imo, its best feature is its command palette (Shift+Ctrl+P). Tremendously helps when you're just getting started. It has also a superb font-related configurations. I do hope I could map specific Unicode codepoints to a particular font, as is the case with kitty.

In terms of use-case, I just disable all its keybindings and use it as a tmux terminal. I admit I didn't look for solutions, but I just can't go away from tmux's session restoration capabilities.

By @kelsey98765431 - 5 months
I will literally switch OS to anything that can implement iTerm2's tmux integration.
By @maztaim - 5 months
I'm a long time tmux fan, but I've been dealing with odd issues related to mouse actions. This is somewhere in alacritty, *vim or tmux. So I futzed with all of them, tried different terminals, all while telling myself it couldn't be tmux. So I just ignored it for over a year. I finally went back and gave wezterm a serious try just a few weeks ago and I am very happy to have switched. The mouse issues I was seeing go away. Splitting panes and resizing lots of panes is fast and responsive. It's built in so copying from a vertical split pane doesn't include the other pane like in tmux.

That doesn't make it perfect. Mouse themes are applied inconsistently as I use Gnome on Wayland. It also seems to be a problem when using neovim, but I can't prove it clearly enough to want to file a bug with anyone. Besides, everything I need to do still works and I rarely use the mouse unless I am copying random gobs of text.

I am sticking with wezterm for the moment. I have no reason to leave it at this point and it helped me reduce the complexity of my stack a teeny bit.

By @dgacmu - 5 months
Ah, rats. It looks nice but to save others a bit of searching, if broadcasting to multiple panes is a requirement for you (something I use often in iterm2), it's not yet supported and not planned for support: https://github.com/wez/wezterm/issues/2658
By @monzool - 5 months
I’ve have been using wezterm for a couple of years now i guess. I am super satisfied with it, and show my appreciation by being a github sponsor. One thing that I really appreciate is, that when I at $work have to use MacOS, I can bring my configuration with me and have the same experience as on my linux box. Other projects do provide that also of course. I did try Alacritty, but that was way to unstable. Kitty have a lot of good stuff going on as well, but it was indeed the lua configuration options that made me pick wezterm. I think the only things I’m missing from Konsole is the infinite scroll buffer and the regex search overlay (continuous search without entering a special copy/search mode)…
By @el_memorioso - 5 months
I used WezTerm for a while and loved it, but then I discovered it had some strange interactions with other programs that use the GPU or OpenGL. In my case, when running WezTerm, the robotics simulation tool Gazebo Classic [0] would only launch properly 1/3 to 1/2 of the time. The rest of the time the simulation appeared to start, but no display ever came up and the program eventually segfalted. I thought this was a Gazebo problem, since it is a bit touchy, but switching to another GPU-accelerated terminal like Kitty or Alacritty solved the problem. I guess the lesson being, if your GL program is misbehaving when launching from WezTerm, try another terminal to see if that doesn't solve the problem.

[0] https://classic.gazebosim.org/

By @javierhonduco - 5 months
Haven’t had the chance to play with WezTerm just yet but wanted to share that the author is an incredibly smart, friendly, and humble.

Had the opportunity to work on a project together at work some years back and I can only aspire to be 1/10th as good of an engineer as him. A true hacker.

By @WD-42 - 5 months
It’s a great terminal but still a bit warty on Linux/wayland. Unfortunately Wez is on OSX, I assume.
By @enricozb - 5 months
One thing I was looking for just yesterday was a way to dump my terminal's (alacrity) scrollback - escape sequences and all - to stdout. I wanted to pipe it to my text editor to search. Alacrity doesn't seem to have this unfortunately, but wezterm does with get-text.
By @robxorb - 5 months
Just tried it. I liked how easy it was to set up colours/fonts etc, using the config file.

But I hit a snag. On macOS, it's standard that in any text window, to select everything for copying, you hit Command-a.

But Command-a in wezterm just printed an "a" character. What?

I spent a while looking in the docs and issues, but couldn't figure out how to Select All.

I don't think I should have to justify it, but in case someone's wondering - it's useful if you want to search or parse an entire Terminal session using some other process (eg, grep), or edit it, or just persist it for example.

Regardless of why, "Select All" is such a standard function it felt quite strange it wasn't suported out of the box.

By @pmarreck - 5 months
Nice! I've been using Wezterm for a couple years.

I use the Embark color theme, which I don't see represented on the wezterm themes page: https://github.com/dmshvetsov/wezterm-embark-theme

I also like a slowly-blinking block cursor, a specific font, ligatures etc. Feel free to raid my config: https://github.com/pmarreck/dotconfig/blob/yolo/wezterm/wezt...

I love that I can use the same config on macOS and Linux as I use both machines often.

By @anothername12 - 5 months
What are you all doing that requires such fine grain selection of a terminal?

I spend a lot of time in a terminal and just use whatever’s there. Terminal.app or gnome-terminal. Before that it was xterm. Perhaps the only customization is modifier key on Mac as meta.

By @CafeRacer - 5 months
I have work to do! I won't drop everything right now to check it...

Okay, maybe for just a few minutes.

By @eigenvalue - 5 months
I'm looking forward to the eventual release of the new terminal that Mitchell Hashimoto has been working on for fun for a few year, Ghostty. From what he has shared online so far, it looks really awesome and well designed.
By @eviks - 5 months
> My favourite WezTerm feature is its use of Lua for defining config.

That's indeed one of its best features (despite the warts of the language) as you're not as limited in what you can do vs. the data serialization alternative

By @jpeeler - 5 months
Can lazy internet help me replicate kitty's word selection (https://sw.kovidgoyal.net/kitty/kittens/hints/) in WezTerm? I believe one would just have to adjust the config for "quick select": https://wezfurlong.org/wezterm/config/lua/config/quick_selec...
By @mianos - 5 months
It seems great but it's unusable to me as it does not support any port forwarding and my connections always go through a few jump boxes.

The built in multiplexing is like magic.

By @theshrike79 - 5 months
I really seem to like software that's configured with Lua.

It looks nice just as a basic setup (key = value type stuff), but you can do really complex dynamic configurations with it (like the dark-mode config in the linked article).

Hammerspoon is another, you can do so many things with it - I replicated most of Rectangle/Manget with Hammerspoon+Lua myself and now I can do the minor tweaks I couldn't do with the pre-packaged apps.

By @benreesman - 5 months
Hardware accelerated ligatures. QED.
By @adem - 5 months
I tried WezTerm on Windows because I was looking for a terminal with ligature support and lower input latency than Windows Terminal. Unfortunately, it still had higher input latency than cmd.exe. The only terminal with ligature support that comes close in terms of input latency is contour (https://contour-terminal.org/).
By @alexcaza - 5 months
As a fellow iTerm2 to Wezterm convert this hit home. There’s loads of useful stuff in here, too! Thanks for the write up. I particularly like the projects setup. I built Weztermocil to achieve something similar that uses itermocil’s configs since that’s what we use at work.

https://github.com/alexcaza/weztermocil

By @auditor_3d - 5 months
I have tried so many I can't count. I have settled on one that seems to be not as well known but should be. Black Box Terminal. It checks all kinds of great boxes for me, I love it.

https://github.com/yonasBSD/blackbox-terminal

By @gtirloni - 5 months
The main feature for me is splitting panes. I used to that in tilix and got western working exactly the same (can't stand tmux , sorry).

The Lua configuration is very intuitive as well.

I do get some indirect crashes when Xwayland crashes, which is rare. I had to disable Wayland support in wezterm because the window decorations aren't great yet.

By @andrei_says_ - 5 months
I’ve been using western but unable to search my command line history or find the relevant documentation.

Ideally fuzzy search of just the commands I’ve entered and not the full scroll history as some results take many hundreds of lines.

Is there a wezterm community where I can ask this and similar questions?

By @greazy - 5 months
I've been using wezterm for more than a year. The defaults are very good.

I need to look into all the advanced features.

By @tambourine_man - 5 months
This looks very interesting. I’ll have to look at it closer later.

https://wezfurlong.org/wezterm/multiplexing.html

Thanks for posting

By @replete - 5 months
iTerm's quake-style visor mode bound to a hotkey is too good to give up...
By @colesantiago - 5 months
There are so many terminals out there.

Curious what sort of features and other things you look for when looking or comparing terminals like WezTerm and the like?

What are your deal breakers and must haves of a terminal emulator?

By @nopcode - 5 months
Why do people mod their terminal prompt to display the current date/time?

It feels like one of these "ricer" things like opening 9 terminals just to run cmatrix and screenfetch.

By @KingOfCoders - 5 months
Would like to switch from Tabby on Windows to WezTerm, but would wish the Win installer would setup WSL2 so it just works. For now I don't want to get into learning a Lua config.
By @xrisk - 5 months
You can dump iterm2s config into a file and sync it to other machines.

Granted it’s not meant to be edited directly but rather via the GUI, but yeah it’s possible to persist it if you want.

By @WuxiFingerHold - 5 months
I had a bit FOMO not using TMUX. But WezTerm and a handful of keybindings for creating tabs, panes, new windows and moving around solved that for me.
By @weinzierl - 5 months
So many comments from people coming from iTerm. What do you have in your WezTerm config to make it more like iTerm?
By @snapplebobapple - 5 months
serious question: why aren't you guys doing all the extra feature stuff in zellij and not having to care so much about what term you are using?
By @throwaway1194 - 5 months
Does anyone know what the default colorscheme is on wezterm?
By @test1235 - 5 months
I've been using wezterm on windows for a while and still not managed to work out how to close a split pane. Is this a bug?
By @tracker1 - 5 months
I'll need to look at it again. Mostly been using Tabby lately, which I like aspects of, but it can be sluggish. I really like the new Microsoft Terminal for Windows, but it's Windows only, unfortunately and I mostly use Linux and Mac.

I looked at WezTerm a long while ago, didn't even realize I'd already had it starred. Will try it out again soon. It's just another one of those things, that I prefer to use the same applications (if I can) on all the platforms I use.

By @rdtsc - 5 months
I like it too, and have switched from iTerm2 to WezTerm recently. I tried some others, but WezTerm has window splitting which I use quite a bit so settled on it. Lua config is nice, although I am a minimal config kind of a person, so only have a few settings in there.

Yeah, iTerm2 has a lot of other fancy features, but I just rarely or never used them, so don't really feel like I miss anything.

By @throwaway1194 - 5 months
Try it on Asahi next.
By @junon - 5 months
Big Wezterm fanboy here.
By @vijucat - 5 months
If I'm fiddling with the terminal or the font, I know it's because I'm procrastinating. I've trained myself to quickly recognize such side-quests and feel a quick punch of hormonal urgency, which helps me get back to work (with mintty and Consolas). You don't need the bells and whistles.