Replacing tmux in my dev workflow
334 comments
·August 1, 2025jelder
saghm
As someone who uses Linux on all my personal machines but has usually had to use a MacBook for work, tmux is also pretty useful as a platform- independent tool for me to reuse the same workflow without needing to worry about differences between the two. I use Alacritty on Linux, but when I've tried using it on MacOS, there have things that don't seem to work for me out of the box the same way they do in Linux (which I'm struggling to remember exactly at the moment, but I think one of them might have been the setting to have the window maximized on startup). Rather than spend time trying to tinker around on an operating system that I don't have any particular desire to use outside of just getting my work done, it's pretty nice to be able to use tmux on iTerm to get basically the same experience I do on Linux. From that perspective, having something like an entirely independent way of scrolling back in a session is a feature to me, not an annoyance.
A lot of these arguments against tmux seem like they're more relevant to someone developing a terminal rather than using it. It's fine for people working on their own terminals to decide they don't care to support it, but I don't really find the arguments convincing as something I should care about, and I'd personally just switch to another terminal with better support for it rather than stop using it.
mike-cardwell
I use a combination of mosh and screen for this. I only need to type something to get my session back, after a reboot. Changing networks or putting my laptop to sleep for days doesn't drop my sessions: https://www.grepular.com/Immortal_SSH_Sessions
sintax
Other options for resumable sessions: tmux/screen + https://eternalterminal.dev/ or https://wezterm.org/ which can resume open windows like you get with iTerm2+tmux.
nyarlathotep_
Mosh is incredibly useful. I have sessions running from uptime until reboot with machines (pis and a desktop) on my local network from my laptop.
I leave with the laptop, return days later, and perform no manual intervention to reconnect. It's absolutely brilliant.
anthk
I used mosh when my data plan plumetted to 2.7 KBPS (~ISDN/2G speeds).
I connected to a public Unix server and read news, IRC'ed, IM'ed and such like crazy. Also, without being connected to a Pubnix, IRC and Gopher did it fine, the web with patience, and the same with Gemini (gemini://gemi.dev has been really useful to read news and scrap a 95% of unneeded scripts and trackers from web sites).
Usenet was slow on fetching, but totally readable the next morning, and, better, offline.
ghkbrew
Mosh looks very cool, though I've never used it. Does Screen provide some advantage over tmux in this setup?
radiofreeeuropa
Mosh is excellent. It lets remote sessions survive (well, automatically and transparently recover from) disruption that reliably kills ssh.
I basically don't use ssh at all any more for interactive sessions, because I'm sick of a few lost packets on wifi or a weak cell signal dropping my connections and forcing me to start over.
Tmux, I used to use and eventually abandoned. I decided I didn't need two keyboard-based window managers (I use Spectacle on Mac) and the one that was only for shells was the one that could go. I have replaced it with nothing, so far, aside from that I just open more Terminal.app windows now (I also used to use iTerm2, for years, until it dawned on me that I was using exactly nothing in it that's not also provided by Terminal.app, and the latter's got better input latency, so I was suffering an extra installed program and slightly less responsive typing for no reason at all)
lostdog
Mosh does not support OSC52, so it's a barrier to getting copy/paste to work.
jvanderbot
Yes. Mosh is a seamless replacement for ssh, and screen is a mostly seamless replacement for tmux. One more level is Mosh+byobu, which is so useful I don't even bother with plain terminals most the time.
suslik
Wow, I've tried tmux like a hundred times and could never learn to like it, falling back to screen and promising to myself - never again. I'm going to break my promise to try this.
fouc
I've always found screen's ctrl-a is so much easier to reach for than tmux's ctrl-b. I recommend re-mapping ctrl-b to ctrl-a
saagarjha
I never really understood the people who use these keybinds. Do you not use it to go to the start of the line?
benreesman
I've had it on C-o forever to mostly stay out of readline's way, but I've been dabbling with C-Space.
_kst_
I use Ctrl-Space.
unbind-key C-b
set -g prefix C-Space
bind-key C-Space send-prefix
I find it a lot easier to type than either Ctrl-A or Ctrl-B.__david__
Both C-a and C-b are so commonly used that I don’t like either of them. I ended up going with C-\ since I only rarely use that one.
anthk
I just remapped the keys to ctrl-z after I swapped ctrl and caps lock. As you'd never suspend stuff under tmux for obvious reasons, you'll get the whole keyset for any cli/tui software.
nolist_policy
Isn't the screen equivalent literally this?
Host tmux
HostName 1.2.3.4
IdentityFile ~/.ssh/etc.etc.etc
RequestTTY force
RemoteCommand screen -dR
Edit: I guess it's missing the iTerm integrationscelerat
I ran into so many little annoying color and font issues with vim, tmux and iTerm2 that I gave up on tmux (for local work). What small benefit I got from tmux on my local machine (basically surviving updates and a little more session persistence) I rarely miss.
I wanted it to be better, and might go back if I could figure out the font issues, but I just don't have the time right now.
quesera
> vim, tmux and iTerm2
Interesting, I've been using exactly that combination for ... as long as tmux and iTerm2 have been around?
I am not aware of any color or font issues. What am I missing?
aargh_aargh
Does any Linux terminal have a comparable integration? I'm still using GNU Screen but willing to give tmux another shot.
felixding
WezTerm
The author of this feature also ported it to the Windows Terminal.
Besides, Chrome OS’s built in terminal also has tmux integration.
natebc
Do you have links to any examples? I've searched for this on and off for years, and i use Wezterm, but i've never been able to make it work like i remember the iTerm2 integration working.
Would love for examples using Windows Terminal as well.
edoceo
There was one called Terminator which had some tmux like features, split panes, broadcast, etc. It's not been maintained in a bit.
rhesa
I used to use terminator for a long time, but i've switched to tilix (https://gnunn1.github.io/tilix-web/) with little pain.
ho_schi
I use happily GNU Screen. Keep it?
dizhn
wezterm
cpuguy83
Pretty sure iTerm is the only term that implements that tmux protocol.
kzrdude
ITerm2 seems really cool, it has so many features. The developer(s?) must be really productive, they churn it out. They support a lot of Kitty protocols for example.
tristan957
Ghostty has infrastructure to support it from my understanding, like Mitchell did the initial plumbing. It just takes a spirited individual to finish it up.
jayknight
I've just now learned about tmux's control mode. Can you explain what that tmux -CC command does? I use `ssh -t <host> tmux attach -d` from bash history to (re)establish my remote tmux session. `new -A -s 0` would do the about same thing, I just don't see how -CC is supposed to work here.
Edit: It appears to be related to iterm2's tmux integration. Neat.
sigwinch
You might not need control mode for that, try `autossh foo ‘tmux new-session -A’`
alexozer
Wow, I was wondering if e.g. Ghostty could implement something like this but that's cool it's already proven out.
Does everything still go "through" tmux (so parsing etc. is still done twice), or does iTerm handle most of the rendering and just delegate scrollback storage/session persistence to tmux? The latter seems like the best of both worlds.
gorjusborg
Composing simpler tools works better than complicated tools that try to solve everything.
I am a former Kitty user and current Ghostty user and hope Ghostty stays basic and good.
op00to
Would mosh stop you from having to reconnect to SSH at least after wake? You'd still need to reestablish a mosh connection after rebooting.
paradox460
Tmux cc mode doesn't work over mosh. Something to do with how it mangles binary going over the wire. Breaks other iTerm2 features like local copy paste from remote paste boards, drag and drop uploaf and download
op00to
Bummer!
bitbasher
This blog post reminds me of _why_ I use tmux. Did you see how much they needed to do to even resemble the workflow of tmux? Jeez, just use tmux. I don't mind dealing with wonky copy and paste once in a while.
> In summary: multiplexers add unnecessary overhead, suffer from a complexity cascade, because they actually have to translate escape codes, modifying them in hackish ways to get them to work with their concepts of windows/sessions.
What does that have to do with you using tmux? You're not the one maintaining tmux's codebase.
Skunkleton
> I don't mind dealing with wonky copy and paste once in a while.
This problem is in no way unique to tmux. You have the same problem with any terminal app that takes over drawing, eg vim. That said it is also easy enough to fix.
The solution is OSC52, a terminal escape sequence that the emulator can use to interact with the system clipboard (kitty, alacritty, iterm2 all support this). The first step is to get you a script that writes out data in that protocol. Its easy enough:
#!/usr/bin/env python3
import os, base64, sys
clip = base64.b64encode(sys.stdin.buffer.read())
for pid in (os.getpid(), os.getppid()): # so that osc52-copy can be invoked by processes that themselves do not have a tty.
cty = f"/proc/{pid}/fd/1"
try:
fd = os.open(cty, os.O_WRONLY)
if os.isatty(fd):
os.write(fd, b'\x1b]52;c;') # the actual escape sequence
os.write(fd, clip)
os.write(fd, b'\a')
break
except:
continue
finally:
os.close(fd)
else:
raise SystemExit(f"no tty")
Now you can do this:$ grep my_thing < some.txt | osc52-copy
And whatever got into osc52 is now on your system clipboard.
Tmux (set -g clipboard on) and nvim (unset clipboard) both have native osc52 support, and the script above can be used to integrate other places.
carodgers
Terminal emulators have taken a very odd attitude toward OSC52. Many (or all?) of them selectively disable either copy, or paste, or both, depending on how cautious the maintainer is.
Yes, it's true that an application that can read system clipboard content may scrape a password, but literally any application running in the terminal can read private keys out of your .ssh folder.
With some heavy reading and a bit of experimentation, you can usually get this working, though.
CGamesPlay
But with OSC 52, any system I ssh into can scrape those passwords. Bigger attack surface, to be sure. And unfortunately there’s no particularly good way of telling if the received escape code originated from the local machine.
procaryote
There are lots of ways to secure your private keys though, including passphrases, having a ssh agent that requires interaction to use a key, having them on hardware security keys etc.
Having osc52 paste default off seems very reasonable
bitbasher
I generally use xclip to copy program output. It has been around forever. Otherwise, I pipe into vim or I'm already using vim and I can copy via visual mode with "+y
tristan957
What is the benefit of this over pbcopy and wl-copy?
larntz
If you're working locally I can't think of much. OSC52 works to copy to your local clipboard from a remote system (e.g., over ssh) from within tmux or nvim as long as you are using a terminal that supports it.
I use it to copy from remote system when I'm in nvim (`"+y`).
Here are a couple links that relate to tmux and nvim.
- tmux: https://github.com/tmux/tmux/wiki/Clipboard
- nvim: https://neovim.io/doc/user/provider.html#clipboard-osc52
meitham
The benefits it works everywhere, even on the blink app on iPhone when you suddenly have to pull out your phone in an emergency, connect to your tmux session away from your usual workstation.
udev4096
I am tired of seeing people creating problems out of nowhere. The reasons author gave are stupid and I am gonna question his "7+ years" of tmux usage
gloomyday
I think some people should just admit they love tinkering with their tools instead of saying it is for productivity or whatever.
yjftsjthsd-h
> and I am gonna question his "7+ years" of tmux usage
Eh, lots of people use tools for ages without digging too deep.
d4rkp4ttern
I learned about Tmux just a few weeks ago and found out that one of the nifty features is that it is scriptable, I.e allows programmatically sending keystrokes to a specific pane. Then, inspired by some Japanese forums I asked myself if I can leverage this to have Claude Code actually interact with an interactive CLI script — we know CC can launch a script via bash but if said script waits for user input then CC can’t (easily) interact with it. Turns out yes we can leverage Tmux for this!
So I used Claude Code to build a little el tool called Tmux-cli, which gives a convenient way to have CC (or any CLI coding agent for that matter) spawn a Tmux Pane, launch a script there, and actually interact with it.
So it’s like Playwright/Puppeteer for the terminal.
You can get it via
uv tool install claude-code-tools
https://github.com/pchalasani/claude-code-toolsThere are some interesting possibilities this enables:
Let CC autonomously test interactive CLI scripts, without me having to intervene and point out errors.
Have the CLI coding agent launch UI from another pane and then use Puppeteer MCP to test from a browser.
Let CC launch a cli script with a debugger enabled (e.g. Pdb) and set breakpoints etc — for token-efficient code understanding, debugging and explaining.
Let the CLI coding agent spawn and drive another instance of the same or other CLI coding agent, AND interact with it. Note this is way better than CC sub-agents which are “spawn and let go” black-boxes.
I wonder if the discussed Tmux alternatives enable building this type of tool.
Izkata
> and found out that one of the nifty features is that it is scriptable, I.e allows programmatically sending keystrokes to a specific pane
In case anyone was curious, screen can do this too with the command "stuff" (read it as the verb like "stuffing something into a box").
Sherveen
Yup, another fun thing to do w/ this: let Claude Code talk to and control Gemini CLI, OpenCode, other CC instances, etc. in interactive mode! A different flavor of subagent. :)
d4rkp4ttern
Indeed, or vice versa where we leverage Gemini’s monster context length
xrd
Make sure you use the pipe operator.
Very cool ideas in this thread.
wild_egg
Do you find the tmux-cli wrapper to improve results?
I tell Claude to use the existing tmux CLI to send-keys, capture-pane, etc. and it works flawlessly. Literally just "never use the Bash tool, run all commands in tmux sessions" and it knows what to do from there.
d4rkp4ttern
One other thing I found is that when it spawns another Claude in a pane, and sends it a message, the enter key doesn’t register if sent immediately, so the other Claude doesn’t act on it. So in Tmux-cli I added a delay after experimenting with various values. I guess with plain Tmux it might run into this issue.
d4rkp4ttern
This is nice to know. I didn’t compare with plain Tmux but should. In Tmux-cli I set up some convenience functions and scaffolding to prevent accidentally killing itself etc. But yes if plain Tmux works well I would just use that; it’s one less context burden.
benji-york
If you're interested in doing similar things but with a terminal, the Kitty remote control mechanism is pretty cool: https://sw.kovidgoyal.net/kitty/remote-control/
xrd
I'm reviewing the docs and interested in the scripting. I like that it uses python to script.
Could I have kitty send each line it receives to an external tool, say via HTTP?
I want to make a custom frontend to claude code, or any other CLI tool, and an obvious easy frontend is a web tool that communicates over HTTP, so getting claude wrapped in a HTTP control system seems like a good starting point.
I'm interested in whether things like "tmux capture-pane" which strips characters come from Kitty as well? Do I need to be cautious of control characters?
blueflow
> So it’s like Playwright/Puppeteer for the terminal
I mean, a tty is just a file descriptor... there have been script(1), expect(1) and chat(8) since the 80ies. tmux is not really necessary.
anuramat
"tmux capture-pane" strips escape sequences that break the terminal and sets all the right variables; try using expect with e.g. neovim
blueflow
I did use a shell script and script(1) to automate vi. Don't see the issue?
barmic12
You right, it's pseudo terminal needed. The module pty of python can do this
woleium
And screen(1) https://linux.die.net/man/1/screen
AlecSchueler
Don't forget tmux(1) https://github.com/tmux/tmux/wiki
epr
These are all great. If you need to do something more involved, pexpect is also worth mentioning. It's a reimplementation of expect in python that's easy to be productive with quickly.
I used it in a previous job to automate configuring thousands of network devices
franktankbank
Your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should.
d4rkp4ttern
Nice. Had to look it up, didn’t know it was a famous Jurassic Park quote, even though I did see it when it came out :)
franktankbank
Right back at you. I think its a pretty interesting application.
JdeBP
> if you do not set TERM with tmux properly, your colors will render incorrectly
This is of course true of every other terminal emulator as well, and indeed it's not only colours that are incorrect. Function and editing keys get recognized incorrectly; REP can get used where it does not work; and even simple relative cursor motions can be done wrongly.
TERM and the ideas incorporated into terminfo/termcap are inherent in the way that terminal devices work on Unices and Linux-based operating systems. That there are different terminals and terminal emulators not all speaking exactly the same protocol is also an unavoidable reality.
Setting TERM properly isn't some tmux-specific problem.
blueflow
Yet the author incorrectly blames it on tmux, which gives the article a bad taste.
Also im not sure whether the scolling problem is actually tmux fault. Tmux uses the alternate screen buffer, the alternate screen buffer is activated using the smcup/rmcup terminfo capabilities, whose semantics actually say that it "fixes" the window viewport in-place so absolute cursor movement has a known zero position. In this state, any native scrolling attempt should have no effect, and the keypress/scroll wheel events should be forwarded to tmux directly.
For some reason, every other terminal emulator still allows local scrolling in the alternate screen, which kinda breaks the semantics of smcup/rmcup and easy scrolling in tmux, too.
aragilar
Sadly after experimenting with a bunch of "modern" terminals I'm forced to consider that their primary audience is more interest in ricing than actually implementing the terminal commands (or connecting to anything other than their favourite linux box) and so I'm stuck with xterm as the only reliable terminal emulator that won't occasionally spew unreadable junk.
t_mahmood
And, actually having terminals crush. It is kind of absurd to have a terminal crush.
I've tried
Wezterm Ghoatty Ptyxis
First two had some frequent crushes, ptyxis is quiet reliable, but I felt it consumes too much memory for a terminal. But I feel it's a good terminal.
Though I wish I could get rid of the headerbar
sgarland
Have you tried Ghostty? Its creator has been pretty serious about getting everything right.
nobleach
I agree. It's also true of nearly any program. If you do not set its configuration properly, it may not work as expected.
In the case of TMUX, it can be a bit annoying because it's not immediately apparent _why_ things look wonky. But I'm not sure what the solution is. Default to 256 colors?
JdeBP
Indeed, the TERM environment variable actually is the configuration of "nearly any program" (excluding the ones that aren't doing explicitly terminal I/O, of course, and the bad ones that just ignore TERM and make assumptions). Set TERM wrongly, and one has set the configuration incorrectly for a whole load of programs, in one fell swoop.
jcgl
Well, not “nearly any program”; I believe that probing for capabilities is the preferred method these days.
qudat
> Setting TERM properly isn't some tmux-specific problem.
Correct, but it's another layer to deal with. There are `tmux` specific TERMs that should be used which sit on top of your terminal emulator TERM. This was my point: you have another layer that you need to be aware of when using tmux and when debugging.
Just look at the top of tmux's FAQ:
https://github.com/tmux/tmux/wiki/FAQ
> PLEASE NOTE: most display problems are due to incorrect TERM! Before reporting problems make SURE that TERM settings are correct inside and outside tmux.
> Inside tmux TERM must be "screen", "tmux" or similar (such as "tmux-256color"). Don't bother reporting problems where it isn't!
> Outside, it should match your terminal: particularly, use "rxvt" for rxvt and derivatives.
wkat4242
> In summary: multiplexers add unnecessary overhead, suffer from a complexity cascade, because they actually have to translate escape codes, modifying them in hackish ways to get them to work with their concepts of windows/sessions.
This is a feature for me. Because less and less applications bother supporting termcap, this way some applications can still work on my VT520.
I don't really care what the kitty dev thinks anyway. He's entitled to his opinion but for me tmux is way more important. Also I think alacritty is better (though I generally just use Konsole).
As a user I only care about what works well for me, not what's architecturally the most elegant solution.
JdeBP
You are very lucky to have a VT520. I have been idly on the look-out for a 525 for years, but not only are they inordinately expensive, the people selling them are not on the same continent as I am (and probably don't have my country's version of the LK).
I've been on the lookout partly just to see whether this works properly with a genuine VT525:
* https://jdebp.uk/Softwares/nosh/guide/commands/console-termi...
Yes, should tmux ever go away, there's another option for transliterating terminal output of applications that just expect all of the modern stuff with AIXTerm's 16 colours and alternate screen buffers and mouse sequences and whatnot and do not check TERM properly. (-:
wkat4242
The 525 was the color version, right?
I like the 520. It's easy because it's the last terminal DEC made, it's the fastest and it can work with ordinary PS/2 keyboards.
The downside is the design is really boring. It looks like a typical OEM VGA monitor from the 90s that you got with every cheap PC clone.
To be honest it's really hard to work with it these days because so many apps just blast xterm codes without checking anything. Tmux helps a bit but it's not perfect.
However I love the feel of it, it's mainly nostalgic but it's also great it can be dimmed so low it's hard to read in a darkened room. My PC monitor is so bright I already use it at 0% brightness during the day. And at night in the dark (I leave the lights off when I have the windows open) it's basically unusable. The 520 is great then and also good for concentrating because there's no distractions.
If you'd like me to test something let me know!
JdeBP
It's colour; but also takes an external VGA monitor rather than having its own.
NoGravitas
My VT420 doesn't support hardware flow control, but software flow control does not play nice with many modern terminal applications. GNU Screen provides an extremely effective workaround, plus its other features. I've used tmux a lot on modern terminal emulators, but it seems to lack this important feature for vintage terminals. Glad that tmux solves your problems with broken apps that don't support termcap or terminfo.
tsowell
Fellow VT420 user here! The problem with tmux is that it disables flow control, but you can fix that with this:
diff --git a/tty.c b/tty.c
index 359dc13..f98c9c4 100644
--- a/tty.c
+++ b/tty.c
@@ -319,8 +319,8 @@ tty_start_tty(struct tty *tty)
event_add(&tty->event_in, NULL);
memcpy(&tio, &tty->tio, sizeof tio);
- tio.c_iflag &= ~(IXON|IXOFF|ICRNL|INLCR|IGNCR|IMAXBEL|ISTRIP);
- tio.c_iflag |= IGNBRK;
+ tio.c_iflag &= ~(IXOFF|ICRNL|INLCR|IGNCR|IMAXBEL|ISTRIP);
+ tio.c_iflag |= IXON|IGNBRK;
tio.c_oflag &= ~(OPOST|ONLCR|OCRNL|ONLRET);
tio.c_lflag &= ~(IEXTEN|ICANON|ECHO|ECHOE|ECHONL|ECHOCTL|ECHOPRT|
ECHOKE|ISIG);
Then you'll want to run this before starting tmux: stty -iutf8 ixon
export LANG=en_US
I also recommend using a dedicated tmux socket with the VT to avoid accidentally connecting to an unpatched tmux server that helpfully re-disables flow control. That happened to me while I was testing the patch, and it was infuriating.I've also hacked up support for storing tmux window contents in different pages of VT memory, so you can switch windows instantly without waiting for full screen redraws. It's a bit rough around the edges (doesn't handle split windows very well, for example), but it's enough of a quality-of-life improvement that I use it anyway. It's a bit long for a comment, but I can post it somewhere if you're interested.
Feel free to email me if you want more information about my setup.
homebrewer
> I think alacritty is better
Can I ask why? It starts slower (has a significant lag on old hardware), has way less useful features (like tabs), has the same responsiveness, and loses in benchmarks (for what they're worth). I see no reason to use it when kitty/ghostty/konsole/foot exist (depending on one's preferences), but people obviously do.
wkat4242
Reloading the config is great and it uses a lot less CPU than kitty on my system when the terminal is constantly being updated. Startup doesn't matter to me as I always have tons of terminals open.
Maledictus
It is written in a memory safe and date race safe language.
nickjj
I still plan to keep using tmux. I like how it manages multiple sessions, making it easy to switch between projects and even resurrect them after rebooting. I also never had a problem with mouse copy / paste using tmux-yank. I've been using this set up for many years.
One cool feature of tmux is its ability to send keys. I did that a few months ago when I was revamping my dotfiles. I kept changing aliases and other shell files and wanted to source those files in dozens of panes at once and also reload neovim when I changed certain config files.
The above was pretty easy to pull off using a combo of tmux's built-in commands and a shell script. I made a post and video about that here: https://nickjanetakis.com/blog/running-commands-in-all-tmux-...
plett
I view "you might not need tmux" in the same way as "you might not need browser tabs".
Yes, if you only have one or two terminal sessions or open web pages then you can probably live without using them, but anything beyond that leads you into reimplementing features to cope with your desktop's lack of ability to manage dozens of windows.
3036e4
That is something I have strived for recently, to use all the great window management features of my window manager of choice instead of browser tabs or lots of terminal tabs running tmux. If that didn't work well I guess it would have been a good sign that I need a better window manager. Even went back to use bookmarks instead of leaving hundreds of tabs open and having a bookmark bar instead of a tab bar is not bad at all.
WhyNotHugo
> I view "you might not need tmux" in the same way as "you might not need browser tabs".
A big difference is that I can move two browser tabs into separate windows, or from separate windows into the same.
The same is actually tree of top-level windows if your window manager can group windows into tabs.
tmux tabs lack this flexibility.
em-bee
tmux can move windows from one session to another or to a new session. pretty much the way browsers move tabs around and create new windows. it can even have the same window in multiple sessions. i'd like to see a browser have the same (identical) tab in multiple windows.
kccqzy
I have come to believe that tab management is really the job of the window manager not individual apps. My window manager allows me to tile windows, or create tabs out of overlapping windows. The tabs can be from the same app or even different ones.
sigwinch
My tmux config has clickable tabs in one terminal.
em-bee
that sounds interesting. there are a few terminals with tmux integration. which terminal are you using? could you share your config please?
tezza
MS Windows has excellent multi window management with Alt Tab Win Tab etc. Far superior to others.
I have all my terminals with distinct icons and background colours to tell them apart. The operating system (Windows) does the heavy lifting.
i tried Mac for about five years but missed MS Windows “every window can be alt tabbed to”. Mac has “every app can be command tabbed to and therein each app has its own subwindow management”
mkl
> MS Windows has excellent multi window management with Alt Tab Win Tab etc. Far superior to others.
If by "others" you mean Mac, okay, but KDE and some other Linux desktops are at least as good as Windows at this out of the box, and much more customisable.
joleyj
> “every app can be command tabbed to and therein each app has its own subwindow management”
This is so, so annoying. Your Mac app’s window is minimized? No alt-tab for you!
sceptic123
Just CMD+TAB to your required app, then hit ↓ arrow and you get access to all your windows. Minimised windows appear at the bottom of the screen.
foldr
Just don’t minimize the window. Removing a window from the alt-Tab list is basically the only reason to minimize it in the first place on Mac. (Not reflexively minimizing windows does take some time to get used to if you’re coming from Windows, admittedly.)
anthk
WindowMaker under GNU/Linux and BSD was like that too...
But, OFC, both WindowMaker and Mac OSX come from the same NeXT grandaddy...
squigz
Windows has basic window and desktop management, but I would hardly describe it as excellent. Most tiling window managers would provide those features and then more.
sceptic123
Whatever fits your mental model I suppose, but every window is accessible via keyboard shortcuts on the Mac too, it just needs a different approach.
coldpie
Do you know if there is a way to quickly switch between only two individual windows in different applications? A very common paradigm for me is swapping between two windows, for example a terminal session for code editing and a browser window for reference. On Windows and most Linux WMs, this is just a quick alt-tab hit to toggle between the two most recently focused windows. As I know there is no way to do this on macOS without bringing _all_ the windows to the foreground, which is not what I want. This is my #1 complaint about macos, I'd be so happy if there is just some shortcut I'm missing to accomplish this.
anthk
Alt-tab? You mean pressing win+w under CWM to fuzzy-find windows per title name, and then spawn it?
bravesoul2
But many terminals have tabs so if all you desire is more than one terminal open but not multiple ui windows there are other options. VSCode for instance!
jefurii
byobu+tmux lets me log into a remote machine once and then have multiple named sessions/workspaces each having multiple named tabs. The sessions persist when I disconnect and are there when I reconnect the next day. Is that possible with terminal tabs?
bravesoul2
That's why the browser tabs analogy breaks down.
meitham
The author of Kitty, Kovid Goyal, calls running tmux on local sessions an “anti-pattern” in the linked GitHub issue. I can’t help but find that a bit ironic, because the very first time I tried Kitty, I was in the middle of work when I discovered Arabic support was broken - https://github.com/kovidgoyal/kitty/issues/536 . I simply launched the macOS Terminal app, attached to the same tmux session, verified my Arabic text rendered correctly, and then closed Kitty. Without tmux, I would’ve been forced to recreate my entire workflow from scratch.
weevil
Anyone calling anything an anti-pattern without evidence always sounds to me like 'I don't like how you do this, but I need to find a more cerebral way of describing that so I don't sound like a child.'
em-bee
it may become an anti pattern once kitty implements all the features tmux has. it appears wezterm did that. if that's the goal, then i am all for it.
FergusArgyll
> Another example is buffer scrollback. It's one of those things where you have to learn the tmux way of scrolling a window. You get used to it, of course, but it's just not great.
And what about mouse select to copy/paste? It works most of the time, but
sometimes tmux gets ignored and I'm selecting across splits which makes the
thing I'm copying impossible to grab without bailing.
funny, those things make me use tmux! My 2nd laptop is a debian terminal-only laptop (it's very old), the mouse doesn't work so the only way to copy paste is tmux (or screen probably but I never learned it) For me, tmux is not replaceablesigwinch
tmux capture-pane - | vim - is a bit more comfortable than the mouse scroll wheel.
esjeon
Interestingly enough, suckless folks took the opposite approach with their terminal:
> Goals … Do not reimplement tmux and his comrades.
( From https://st.suckless.org/goals/ )
frantathefranta
I'd say suckless and Kitty are pretty much the polar opposites of development.
sevensor
Kitty is great; I want to see it succeed in pushing terminal emulators forward into the current millennium. However, I can’t use kitty at work, and I absolutely live inside of tmux. The server is where all the action is, and when I get disconnected, I want to be able to pick things up exactly where I left them. Window layout, the state of each shell and text editor, what’s in the copy buffer, scrollback, everything. I can’t give that up unless I have a suitable replacement on Windows. Until then I will continue to use tmux at work and kitty at home.
gorjusborg
I used Kitty for a while. I was impressed that I could recreate my tmux config pretty closely.
I went back to tmux and basic terminal because it works everywhere, and composing tools is just more durable overall.
em-bee
how do you do something like tmux sessions (not just windows) in kitty? how does switching sessions and windows work? can i connect to the same session in multiple windows? or can i manage separate windows with different sets of sessions?
pure-orange
This doesn’t sound like a “you might not need tmux” argument. It more just argues than tmux is a pita on the terminal ecosystem which I’m sure is true. But the workarounds described are just reimplementing tmux features by taping together a bunch of tools. A better argument I think is - a lot of people do need tmux, so perhaps we should rethink protocols etc to make many of these features more native
mananaysiempre
At one point I was wondering if there was a preexisting protocol for a character-based framebuffer of some sort, that we could then use to slice the problem in a different way: a framebuffer multipliexer running terminal emulators inside it instead of a terminal multiplexer emulating multiple terminals into a framebuffer and then translating it back into terminal controls for the parent.
Unfortunately, my conclusion was that the only independent character-based terminal tradition is IBM’s 3270 stuff, but even setting aside IBM weirdness it’s simply not that. (Yes, there’s also such a protocol within tmux but it’s not really compatible with anything else.)
rollcat
> It more just argues than tmux is a pita on the terminal ecosystem which I’m sure is true.
Start thinking of tmux, screen, ssh, etc as terminal emulators, and everything will suddenly make sense.
> perhaps we should rethink protocols etc to make many of these features more native
I've been opposing terminal emulators (NOTE: emulators, not REPLs) for a long while. I also do believe we can collectively do better than emulating 1970s hardware. I do believe we can build applications where "ctrl-c" means copy, and selecting more than one screen's worth of text is possible. It's not hard, we're just stubborn.
em-bee
nitpick: ctrl-c never meant copy until windows started to dominate. it didn't even mean that in DOS. selecting more than one screens worth of text is possible in gui terminals and also in tmux.
but i agree with your general point: we can collectively do better than emulating 1970s hardware
absolutely!
mananaysiempre
Nit: didn’t Ctrl-X/C/V come from the original Macintosh? I thought Windows initially followed IBM’s CUA, where cut / copy / paste are instead Shift-Delete / Ctrl-Insert / Shift-Insert (and those still work too).
rollcat
> nitpick: ctrl-c never meant copy until windows started to dominate. it didn't even mean that in DOS.
VT102 wasn't designed with multiplexing in mind. The device was meant as a primary way to interact with a computer, not to perform the tasks of one - your physical keyboard also doesn't understand "copy".
> selecting more than one screens worth of text is possible in gui terminals and also in tmux.
It is but it isn't. You want to copy a multiline snippet of code you just wrote, you will have to manually strip away $PS1 & $PS2. You want to copy from vi into another window, you can't use the mouse - and you have to use a side channel.
I have 20+ unfixable issues outlined, and I'm in the process of writing a blog post... But at my current rate, it could become a book.
anthk
That's Emacs for you. No, seriously. Have a look to eshell and elisp.
rollcat
I'm trying to get away from Emacs.
I've built a standalone PoC REPL with an inferior process as a uni student (2010), it was ca 200 lines of Python and Tk. Stuff you get for free: text selection, copy/paste, multiline editing, proportional fonts, etc. It's not a hard problem, but there seems to be little collective interest to push such efforts forward.
The best idea I've seen so far is Swift Playgrounds. You get a text editor, start writing a script, run it at your own convenience, standard stuff. The good stuff is, it takes a snapshot of the running process at every line, and allows you to travel back in time, inspect the state in a debugger, and rerun from any single point. When you hit run, it restarts from the first new line, so you never pay the upfront cost of a prior heavy computation.
You get every benefit of a REPL, plus every benefit of a simple IDE, plus a time travelling debugger, plus vertical integration.
If only it wasn't just Swift.
dizhn
weztern has a really strong solution in this space when you use it with its multiplexing server on the remote end.
charcircuit
It's more like you don't need to use a webpage that offers tabs using iframes because the browser natively has tabs that you could be using instead.
pastage
Having native scroll back should be possible if you hack tmux and a terminal emulator.
null
This is written for the Linux-on-the-Desktop crowd, and good for them. But tmux really shines for folks using MacBooks with iTerm2. Its tmux integration is so good that it simply disappears into my workflow.
With this in my `~/.ssh/config`, I can just type `ssh tmux` to get back to my remote dev box whenever I wake my computer or change connections.
With iTerm2's tmux integration enabled, this will pop open a new window where the remote tmux tabs and scroll buffer look and act just like native, local iTerm2 tabs and scroll buffer. I don't even know any tmux commands.