← Back to context

Comment by panki27

1 day ago

Switching to WezTerm has completely eliminated the need for tmux for me - except for stuff I want to run server side, disconnect and come back to.

Maybe I'm a bit weird, but I don't know why you'd want to run tmux locally as an alternative to using tiling wm/tabs/other equivalent feature of your terminal emulator? I use tmux in two ways: 1. Persistent long-running sessions (which typically involve having more than one tty going at once, so something like shpool seems like a downgrade). 2. Local named-network-namespace sessions where I'm connected to a VPN and so not having to reconnect to the same namespace/vpn for every new tty is a benefit.

Also, if you do physically connect to a headless machine, it's nice to not need to keep having to open a new getty session (or be able to log out of a session) ;)

  • i have 5 tmux sessions with a total of 19 windows on my laptop, one of which contains a localhost ssh connection to a second account where i have another tmux session with half a dozen windows. not to mention the tmux sessions i have on my servers.

    the key benefit is i only need to learn one set of commands to switch sessions and windows, and to create new windows.

    the sessions all run in a single terminal window, so when i have multiple other windows, i don't have to switch between them to find the right terminal window. terminals have tabs, but they don't group tabs into sessions. a single terminal with 19 tabs would not work.

    i use the gui to start the terminal. i would have to find out how to script starting a terminal with multiple tabs. tmux is more easily scriptable, and again, i can't avoid learning tmux, since i use it remotely, and so when using it locally too, i don't have to learn a different way for my local machine.

    finally, although rarely needed, i can log out, or my gui can crash, but the tmux sessions survive. i can also connect to my laptop from a different device and attach to the tmux sessions that way.

    for a gui terminal to replace tmux the foremost feature i need is for it to remember my windows and tabs, just like the browser does. i have not come across any terminal that does that (but i admit, i haven't done a exhaustive search either). gnome (or any WM) can remember which apps i have open, but it can't remember the state inside the apps.

    being able to reproduce state is really the key. i have a few vim sessions for example, easily remembered and recalled from my command line history. i could use gvim if i could figure out how to connect a gvim window with a terminal such that they form one unit, because every vim session is connected a number of commandline operations. (i believe BeOS/haiku can potentially do that based on the way its window tabs work)

  • Two reasons:

    I don't use a tiling WM, and tmux[1] does an excellent job at the tiling features.

    I do the majority of my work physically at a Linux (Fedora) desktop, but I also work from home SSH'd to that desktop. Being able to just attach to the same session and pick up where I left off, with all the same shell management, is great.

    [1] I used tmux for years, but have very recently switched to Zellij. I find the pane navigation to be much smoother (and more discoverable).

same, and those 2 plugins together completely eliminated need for tmux/zelij locally

- https://github.com/MLFlexer/smart_workspace_switcher.wezterm

- https://github.com/MLFlexer/resurrect.wezterm

  • These seem nice but honestly feel like overkill for the most basic (and probably most typical?) use of tmux and similar.

    I generally have a single session I care about per machine (rather than per project) and wezterm's built-in multiplexing handles this out of the box.

I agree. I've used first Kitty and more recently WezTerm (and now occasionally Ghostty, too) for years and every time I've tried tmux/zellij I've found nothing (except as you say for occasional long running server sessions) in either that justifies the noticable latency increase for me.

`wezterm ssh` can do this if wezterm is installed on the host.

  • Yeah - it seems like this is a pretty undersold feature of WezTerm. It has completely eliminated tmux and Zellij for me outside of pairing with others.