News for hackers. Stuff that matters.
Re:Tmux is worse-is-better by kelnos on Saturday May 25, 2024 @02:00PM (#40476695)
I feel like "parsing each keystroke twice" is pretty low on the list of things that wastes CPU cycles and drains my laptop battery. I cannot at all get worked up over this, getting to the point I'd pull out the word "poison" to describe it.

It's nice that Kitty does most of what tmux does built in, but as the author points out, that's not really all that helpful for anyone who does any work over ssh.

And to me, bundling all that into a terminal emulator is bloat. Terminals should be terminals. If I want a multiplexer on top of that, I will... use a multiplexer on top of that.

I am potentially sympathetic to the idea that tmux and screen make it harder for terminal developers to add new features to their terminals. I don't really know enough about the issues involved to form an opinion. But from the perspective of a regular user, I do not want a multiplexer in my terminal app. When I need one, I prefer to reach for an app-agnostic multiplexer like tmux or screen.

Re:Tmux is worse-is-better by fiddlerwoaroof on Saturday May 25, 2024 @02:53PM (#40477055)
I like how iTerm2 can act as a UI for tmux via tmux’s control protocol. We don’t need to reinvent tmux to fix some of the UX issues of tmux sessions inside terminal tabs inside terminal windows.
Re:Tmux is worse-is-better by lathiat on Saturday May 25, 2024 @07:07PM (#40478501)
This is my favourite, I use it all the time. There's a couple bugs that show up but it's really good. Having real local tabs for a remote SSH is great.
Re:Tmux is worse-is-better by BeefySwain on Saturday May 25, 2024 @07:11PM (#40478522)
Anyone know of a terminal for Linux with this feature?
Re:Tmux is worse-is-better by fiddlerwoaroof on Saturday May 25, 2024 @07:40PM (#40478672)
I haven’t found a great Linux terminal: it’s one of the things that really makes it hard for me to use Linux
Re:Tmux is worse-is-better by naikrovek on Saturday May 25, 2024 @07:49PM (#40478705)
What? Xterm is amazing.
Re:Tmux is worse-is-better by coldtea on Saturday May 25, 2024 @08:40PM (#40478904)
Parent means with those kind of features something like iTerm has
Re:Tmux is worse-is-better by fiddlerwoaroof on Saturday May 25, 2024 @09:13PM (#40479050)
iTerm2 has a ton of quality of life features that no alternate terminal comes close to: automatically detecting tables in output and handling copy/paste correctly. Quick navigation between shell prompts, etc.

If emacs wasn’t really slow with long lines in buffers and high volume output, it could be better

Re:Tmux is worse-is-better by dmd on Saturday May 25, 2024 @11:55PM (#40479681)
> automatically detecting tables in output

What is this? I've been using iterm2 for years and don't know about this (and can't seem to find anything mentioning it).

Re:Tmux is worse-is-better by fiddlerwoaroof on Sunday May 26, 2024 @12:00AM (#40479704)
https://apple.stackexchange.com/questions/364888/how-can-i-l...

“Tables” is imprecise, but is one use-case: it’s more about identifying soft boundaries like the lines between tmux or vim splits and limiting the selection to one side of the split. If you have pipe-delimited tables, it lets you select a single column of values.

Re:Tmux is worse-is-better by dmd on Sunday May 26, 2024 @09:22AM (#40481970)
!!! THANK YOU !!! (and George Nachman) I had no idea this existed and this is a dozens-of-times-daily pain point for me.
Re:Tmux is worse-is-better by naikrovek on Saturday May 25, 2024 @11:50PM (#40479669)
The correct way to handle copy and paste in a terminal is to copy what is selected verbatim and to paste whatever is in the clipboard verbatim.

Interpretation of intent and “helping” the user are neither needed nor desired, and at best leave everything alone and at worst misinterpret and get in the way.

I have never copied anything out of a terminal and gotten anything other than what I copied when I pasted into sublime text, and I’ve never used iterm2.

Are you talking about copying from a terminal and pasting into OneNote or some other “more than plain text” application or something?

Re:Tmux is worse-is-better by fiddlerwoaroof on Saturday May 25, 2024 @11:59PM (#40479697)
No, I’m talking about noticing that you have a tmux or vim split and restricting the selection to one side or another of the split so that you can select the actual text rather than some random nonsensical text.

This is the single feature I miss the most in any other terminal emulator.

Re:Tmux is worse-is-better by naikrovek on Sunday May 26, 2024 @12:11AM (#40479734)
Ah, ok. I don’t use tmux or any other multiplexer, I handle that problem differently.
Re:Tmux is worse-is-better by iforgotpassword on Sunday May 26, 2024 @03:41AM (#40480347)
I prefer manual control. Simply holding down Ctrl while selecting creates a rectangular selection in pretty much every terminal, which works in all those cases.
Re:Tmux is worse-is-better by DEADMINCE on Sunday May 26, 2024 @04:15AM (#40480482)
People tend to get attached to certain methods/ways and then defend that no matter what.
Re:Tmux is worse-is-better by chalupaman on Monday May 27, 2024 @03:35AM (#40488541)
At least in the terminals I’ve used so far, holding down Ctrl causes you select the displayed form, not the verbatim form of what you’re highlighting. That is, if you’re in vim looking at a file with 10 long lines, selecting them this way will only select the portion that fits onto your screen, not the entire lines. And if your editor visually wraps them so they do fit on the screen, selecting this way will introduce unwanted line breaks, such that copying 10 lines and pasting can create 23 lines.

The iTerm2 feature being discussed means that selecting works the same way it does for graphical programs like Gedit or Pycharm or Word — if you select 10 lines you select 10 lines and your window size, font size and visual wrap setting don’t factor into it, and when you paste, you paste what you copied as it was. I would say this is the intuitive and reasonable behavior, but it’s one that is not simple to implement. A visual word wrap should be a purely visual thing and s back to back Cut and Paste should result in nothing changing.

Re:Tmux is worse-is-better by iforgotpassword on Tuesday May 28, 2024 @04:26AM (#40498636)
Good point, didn't think of that, probably not encountering that case often enough in my workflow.
Re:Tmux is worse-is-better by tremon on Monday May 27, 2024 @07:50AM (#40489930)
copy what is selected verbatim

Does that include all trailing whitespace in the rectangle you selected? Should your selection automatically minimize to unselect said trailing whitespace (even before copying, I mean)? Should a selection preserve tab characters or replace them with spaces? What if the selection does not start at a tab boundary, should it ignore or include the half-selected tab instance?

I don't think there is a singular answer to what "copy selection verbatim" means.

Re:Tmux is worse-is-better by haskman on Sunday May 26, 2024 @01:23AM (#40479943)
I just tried with kitty, and konsole, on linux and selecting text within a tmux split works perfectly. So does copy-paste (use Ctrl-Shift-C instead of Ctrl-C).
Re:Tmux is worse-is-better by fiddlerwoaroof on Sunday May 26, 2024 @11:53AM (#40483125)
Is this through tmux’s mouse mode? Can you select three lines of only the left side of the session? Does this also work in vim and other places that draw soft boundaries on the screen?

A couple years ago, I tried this in kitty and a couple other Linux terminals and none of them implemented this.

Re:Tmux is worse-is-better by haskman on Sunday May 26, 2024 @03:43PM (#40484782)
Yes I see what you mean. I have tmux mouse mode enabled which makes this possible. This works in nvim as well because it also has mouse support. Presumably iTerm supports selecting text in a single pane even when you have mouse mode turned off.

IMO this setting belongs with the application, and especially with tmux and nvim supporting this natively, you don't really need the terminal itself to implement some potentially fallible heuristic. For example with iTerm if you accidentally drag outside the pane boundary, the selection immediately expands to include both the panes, which is not ideal.

Re:Tmux is worse-is-better by fiddlerwoaroof on Sunday May 26, 2024 @04:02PM (#40484909)
I like it because I can design programs to output pipe-delimited tables and selection works correctly (I also hate terminal apps that use the mouse and disable mouse mode everywhere so that mouse selection in the terminal works predictably)
Re:Tmux is worse-is-better by mgkimsal on Sunday May 26, 2024 @02:38PM (#40484362)
"handling copy/paste correctly."

Sometime in the last year, iterm2 started adding ~00~ crap around stuff I paste. then some yellow 'alert' box at the top indicating I'm doing something wrong and do I want to keep doing it. makes 0 sense to me, and... annoying because it didn't do it for the first... 6-7+ years I used it. My behaviour didn't change, but iterm2 starts breaking.

No doubt there's some 100% logical explanation as to what changed such that my standard copy/paste is 'wrong' now, but... would have preferred they'd have kept the original behaviour.

Re:Tmux is worse-is-better by fiddlerwoaroof on Sunday May 26, 2024 @04:01PM (#40484899)
This is probably the bracketed paste feature: https://invisible-island.net/xterm/xterm-paste64.html

There’s a toggle in the terminal settings

Re:Tmux is worse-is-better by ColCh on Monday May 27, 2024 @05:56PM (#40495137)
Just wanted to note for everybody who really loves this feature. There is some options here though

Wezterm terminal supports multiplexing from the box: https://wezfurlong.org/wezterm/multiplexing.HTML

Also, there is Hyper terminal, and standalone protocol to implement multiplexing https://www.reddit.com/r/commandline/comments/q5mj11/htm_a_c...

If you know other options, please share.

I work in windows, but at home I use macos, so I stick to wezterm. I use it with single config for both platforms (config is written in Lua)

Re:Tmux is worse-is-better by mashrooms on Tuesday May 28, 2024 @12:51AM (#40497433)
Wezterm does not have good enough multiplexing like tmux. such like you have not easy way to switch/create sessions.
Re:Tmux is worse-is-better by Xeamek on Saturday May 25, 2024 @03:04PM (#40477128)
>that's not really all that helpful for anyone who does any work over ssh.

If you are hoping to new machines every time then sure.

But lets be honest, thats a minority.

I don't know kitty in specific, but wezterm ie. can connect to target via SSH, start daemon of itself there and actually work better then tmux, because it's controlled from the client (where the gui runs), but with all the tmux upsides.

And yes, it's not as portable as tmux (simply because its not as popular), but again, in majority of the situations the setup required is really not that much. Especially if you would spend that time on tmux config anyway.

Re:Tmux is worse-is-better by sweeter on Saturday May 25, 2024 @03:26PM (#40477239)
Kitty does this as well. They have a section on ssh-integration on the wiki. I personally love it. I can use the kitty multiplexer remotely and I can copy and paste from local to remote. So at least he does implement a solution/alternative.

The thing I like about tmux and zellij is persistence and the "task-runner" nature of them. Its great for managing sessions and running things in the background. Though I do hate how they also break a lot of features that I do like about terminals.

Re:Tmux is worse-is-better by em-bee on Saturday May 25, 2024 @05:27PM (#40477997)
all of the tmux upsides? including detach and reattach to a running session? i'd love a nice gui for tabs, but i really use tmux for its ability to survive gui crashes locally and network disconnects when running remotely.
Re:Tmux is worse-is-better by Xeamek on Saturday May 25, 2024 @05:45PM (#40478109)
As I said, on connections it's spawns a daemon on target machine that will do exactly that - keeping the State despite clients disconnection
Re:Tmux is worse-is-better by em-bee on Saturday May 25, 2024 @07:58PM (#40478753)
oh, sorry. i didn't read your comment close enough. that actually sounds interesting. i'll have to take a look. although i prefer mosh over ssh because it is more reliable with the slow connection that i have. however if wezterm can reconnect like mosh that might work. thanks.
Re:Tmux is worse-is-better by pzmarzly on Saturday May 25, 2024 @02:29PM (#40476905)
From the perspective of "a regular user" (which is a bad term, because of course I see myself as the norm), I don't care if multiplexer is part of terminal app or not, but I do care about it reacting to my clicks. I don't want to learn obscure multi-step keyboard shortcuts in order to open a new tab, rename a tab, resize a pane, reorder tabs, copy the scrollback buffer, etc.

Sadly, that seems to leave me with only 2 options that work well over SSH:

- using a terminal with client-server model and built-in multiplexer (VSCode Remote SSH extension, WezTerm)

- using iTerm2 with tmux integration (apparently nothing else implements tmux control protocol https://unix.stackexchange.com/a/280829)

Re:Tmux is worse-is-better by Barrin92 on Saturday May 25, 2024 @02:31PM (#40476917)
you might want to give Zellij a try. (https://zellij.dev/) Works like tmux but with the UI friendliness of more modern apps.
Re:Tmux is worse-is-better by pzmarzly on Saturday May 25, 2024 @03:28PM (#40477248)
Okay, just going through the first tutorial[0], I am convinced that Zellij is truly something else. I've never opened up my wallet[1] so quickly for any open-source project, but here the author is clearly creating something amazing (and maintaining awesome documentation and tutorials!). Thank you a lot for this recommendation :D

BTW this is the first time I've seen a working drag and drop TUI (you can use drag-and-drop to move floating panes around).

[0] https://zellij.dev/tutorials/basic-functionality/ [1] https://github.com/sponsors/imsnif

Re:Tmux is worse-is-better by skitter on Saturday May 25, 2024 @03:54PM (#40477403)
Maybe it's because I don't use it that intensely, but I've found the default a bit noisy, so I switched my default layout to only contain `pane` and turned pane frames off.
Re:Tmux is worse-is-better by naikrovek on Saturday May 25, 2024 @07:52PM (#40478718)
TurboVision from the 1980s or 1990s has draggable and overlappable windows inside a single shell/DOS screen.

https://tvision.sourceforge.net/tvQNX-pterm-photon.jpg

Re:Tmux is worse-is-better by iforgotpassword on Sunday May 26, 2024 @03:45AM (#40480367)
Yes but that's just writing to the vram directly, just as keyboard and mouse are read directly. Not the madness of going through heaps and loads of batshit crazy terminal extensions, escape codes and decades of cruft and hacks piled upon the tty.
Re:Tmux is worse-is-better by naikrovek on Sunday May 26, 2024 @06:07PM (#40485832)
That's not correct. Tvision has worked in terminals for almost as long as terminals have existed.

https://github.com/magiblot/tvision

Re:Tmux is worse-is-better by Izkata on Saturday May 25, 2024 @05:48PM (#40478130)
Reminds me a bit of twin: https://github.com/cosmos72/twin

I found out about it from this blog post nearly two decades ago: http://web.archive.org/web/20190120170204/http://www.termina...

Re:Tmux is worse-is-better by 98347598 on Saturday May 25, 2024 @07:51PM (#40478715)
Unfortunately zellij doesn't implement job control properly, so running certain daemons or other things that use process groups are very broken.
Re:Tmux is worse-is-better by heavyset_go on Saturday May 25, 2024 @07:42PM (#40478681)
Try Byobu with mouse-mode on. It uses a tmux as a backend and provides complete control with a mouse, including context menus that allow you do all of the things you listed without obscure keyboard shortcuts.
Re:Tmux is worse-is-better by fwip on Sunday May 26, 2024 @05:35PM (#40485598)

    set-option -g mouse on
Drop that in your ~/.tmux.conf file.

Then you can create new windows or panes by right-clicking (and clicking on the drop down), click on a pane to focus it, click on a window name to focus it, right-click to rename it, drag to highlight text or to adjust the width of a pane, etc, etc.

Re:Tmux is worse-is-better by scoodah on Saturday May 25, 2024 @04:20PM (#40477549)
> I cannot at all get worked up over this, getting to the point I'd pull out the word "poison" to describe it.

Kovid Goyal has a history of being incredibly opinionated to the point of being combative and toxic at times. He makes some great software, I’m a user of kitty, but this hyperbolic tone about this issue is not shocking to me at all.

Re:Tmux is worse-is-better by DaSHacka on Sunday May 26, 2024 @02:52AM (#40480214)
Reminds me when he said he'd maintain the entire python 2 language instead of upgrading Calibre to use python 3

https://bugs.launchpad.net/calibre/+bug/1714107

There are a lot of other gems too if you look through Calibre's bug tracker

https://bugs.launchpad.net/calibre/+bug/885027

https://bugs.launchpad.net/calibre/+bug/1894442

https://bugs.launchpad.net/calibre/+bug/853934

Re:Tmux is worse-is-better by rickstanley on Saturday May 25, 2024 @02:41PM (#40476982)
Fully agreed.

I myself use 2 terminals: Alacritty and WezTerm. The former for local work, and the latter for my VMs, and occasional remote server work.

I couldn't explain exactly why I use separated applications, since WezTerm works well for local (which even has a menu entry for that) and remote alike, but I'm comfortable with the workflow that I have today, and for me it's enough and what matters.

Re:Tmux is worse-is-better by bayindirh on Saturday May 25, 2024 @02:38PM (#40476967)
> I am potentially sympathetic to the idea that tmux and screen make it harder for terminal developers to add new features to their terminals.

Both are actively maintained and can work with modern terminals, as long as the hosting terminal is standards compliant.

I don't understand why people love to break standards.

Re:Tmux is worse-is-better by fiddlerwoaroof on Saturday May 25, 2024 @02:55PM (#40477074)
The cynical view is that non-standard features make your product sticky
Re:Tmux is worse-is-better by bayindirh on Saturday May 25, 2024 @03:56PM (#40477422)
So EEE is preferred now?
Re:Tmux is worse-is-better by aumerle on Sunday May 26, 2024 @02:08AM (#40480090)
1) There are no standards 2) The problem happens when someone wants to add something new to the terminal ecosystem. 2a) Designing something becomes harder because it has to be designed to work with the horrible hack that is terminal multiplxer. The tty model is dead simple, one tty per child process. When you add a terminal multiplxer it completely confuses this simplicity, making it instead multiple processes per tty and does it in a way that is opaque to both the processes and the host terminal, leading to endless bug and incompatibilities. 2b) Any new feature is now gatekept by the individuals in charge of the multiplexer projects.
Re:Tmux is worse-is-better by bayindirh on Monday May 27, 2024 @04:49AM (#40488932)
> There are no standards.

I don't agree with this. There are tons of standards (even if it's de-facto) from VTxxx to XTerm's emulation standards. If there were no standards, it wouldn't be possible to talk with a modern system using a real VT320 (Yes, we have these), or with a vintage system with a modern terminal over a TTYUSB device.

> The problem happens when someone wants to add something new to the terminal ecosystem.

I understand, but every decent standard should take what's done before them and be prepared to face with it. Let it be Ethernet, TTY, even something modern like DisplayPort. When people doesn't do their due diligence and spend the time required to handle edge cases, things are bound to break (e.g. Cheap monitors' firmware contains identical serial numbers, causing all types of shenanigans in multi-monitor setups).

> 2a) Designing something becomes harder because it has to be designed to work with the horrible hack that is terminal multiplxer.

For harder part, see the previous paragraph. i.e.: One should do their homework to work with other systems. On the oh gawd horrible hack! part, That "horrible hack" is saving hours of work per month per person who work with remote servers for ~30 years now, and nobody is planning to give them up AFAICS.

> The tty model is dead simple, one tty per child process. When you add a terminal multiplxer it completely confuses this simplicity, making it instead multiple processes per tty and does it in a way that is opaque to both the processes and the host terminal, leading to endless bug and incompatibilities.

Maybe one should draft a new standard about multiplexing terminals persistently without it being a hack? There's a big gap there, as you point out.

> 2b) Any new feature is now gatekept by the individuals in charge of the multiplexer projects.

Both screen and tmux are maintained properly, and they fix the bugs they cause actively. For example, screen was causing a problem in SGR mode, and they fixed it 2 months ago [0].

Oh, on SGR; it's an ECMA Standard. Standard-48 to be more precise [1]. So, again, there are standards, and you can build new ones, and I bet, terminal multiplexers will play along if you don't throw eggs at them.

[0]: https://git.savannah.gnu.org/cgit/screen.git/commit/?id=c184...

[1]: https://www.ecma-international.org/wp-content/uploads/ECMA-4...

Re:Tmux is worse-is-better by aumerle on Monday May 27, 2024 @11:59AM (#40491988)
A de-facto standard is not a standard. It's an opinion.

I suggest you go plug a VGA cable into a DisplayPort and see what happens.

The horrible hack is saving you and the few other very loud people that use it hours of work. I for instance have been using remote servers for 40 years without ever needing a multiplexer. They have always been, and remain, horrible hacks that I rejected when I first came across them and that have been a drag on the entire terminal ecosystem for 30 years. Thankfully they are finally on their way out, thanks to a new generation of terminal emulators and are using the tty the way it was designed to be used.

The new standard is the old one. Use the tty as it was intended and designed without a horrible hack in the middle. And if you really need remote persistence via a multiplexer of all things, then use one provided by the terminal emulator you use so that it integrates natively, seamlessly and correctly with the terminal emulator. Granted currently only WezTerm provides such a multiplexer, kitty for instance instead multiplexes SSH access via SSH control masters. But its developer has indicated he will someday write a tmux replacement that is kitty native.

Oh and on SGR it is an ECMA standard, only in the breach. For example, color support as it is actually used in terminals violates the so called specification.

As for multiplxers playing along, here you go: https://github.com/tmux/tmux/issues/1391

Complete and utter drag on the ecosystem.

Re:Tmux is worse-is-better by bayindirh on Tuesday May 28, 2024 @04:00AM (#40498491)
> A de-facto standard is not a standard. It's an opinion.

OK. Let's look what happened some of these opinions.

    - PDF became two different ISO standards.
    - USB started as a de facto charging port, became de jure in EU.
    - DMX, MIDI, DE-9 RS232 connectors are all de-facto standards, but used as de-jure now.
    - Tons of file formats in scientific and engineering computing is in fact de-facto standards, yet they flourish.
So, it's meaningless whether a standard is de-facto or de-jure. If it looks/walks/sounds like a duck, it's a duck.

> I suggest you go plug a VGA cable into a DisplayPort and see what happens.

I use something similar to this [0]. It works.

> The horrible hack is saving you and the few other very loud people that use it hours of work.

I love how you liberally throw the h-word around. Because horrible hacks became conventions over history. Vi's latency hiding can be considered "a horrible hack", or "brilliant" depending on the perspective. Same can be said for HDMI for example. Piggybacking on DVI for video signalization, adding a couple of digital lanes for sound and Ethernet, it can be considered a horrible hack, yet it's a de-jure industry standard. IOW, someone's opinion, just in a written form with some stamps and a logo.

From my vantage point, people not using terminal multiplexers (tmux/screen) are a shrinking minority, yet from your perspective it's the opposite. Considering the oh gawd horrible terminal multiplexers are still maintained, and I still initiate people on screen or show them tmux as a screen alternative, I don't see they're going anywhere. Your perspective may differ. I'm mostly talking about younger generations, I may add.

> I for instance have been using remote servers for 40 years without ever needing a multiplexer.

I think you're lucky for not having to debug things on the go, for days, or managing servers on a responsive and stable network. I sometimes have no luxuries, so I have to use horrible, horrible hacks to get things done. It works brilliantly unfortunately. Shame on me.

> I rejected when I first came across them and that have been a drag on the entire terminal ecosystem for 30 years.

That's a long grudge to hold. I'm sure it's not the only one. Think about your health. No it's not meant to snark. I'm honest.

> Thankfully they are finally on their way out, thanks to a new generation of terminal emulators and are using the tty the way it was designed to be used.

I don't see it's happening, sorry. What I see is more hacks are piled upon hacks. Some might stick and become standards, some might die.

> Granted currently only WezTerm provides such a multiplexer...

Wezterm's multiplexer is a regular old multiplexer which connects to a remote wezterm instance. IOW, just a different transport which encapsulates a WezTerm instance. There's nothing magic here. It's moving the hack to another layer. Now there are two transports, and Wezterm's one is not interoperable with others. So it's a really horrible hack from my perspective. If something is not interoperable with other tools, then it's out for me. I can't be bothered to install Wezterm to all and every server I work with. Which is >1000.

Unfortunately, I have the luxury of choosing the terminal which I want to work with in any circumstance. As long as I can connect to my remote server, my persistent workspace is there. I don't need a local Wezterm to be able to work.

> ...without a horrible hack in the middle.

Wezterm puts the horrible hack on top. Like a cherry. Bright and eye-catching, in a bad way.

> As for multiplxers[sic] playing along, here you go: https://github.com/tmux/tmux/issues/1391

I read the bug report. I think the problem is the approach. If somebody is so adamant in a feature, and the maintainer doesn't want to add that feature, a) you can patch it yourself, b) you can fork and patch it yourself. It's free software. The tmux maintainers doesn't owe you anything. I bet, if you send in a nice patch, they won't ghost/reject you.

BTW, a mux is just another terminal emulator inside your terminal. It's not more of an hack compared to an ncurses window, or old graphic interfaces in UNIX systems.

> Oh and on SGR it is an ECMA standard, only in the breach.

Many standards are flexed. Many graphics cards do not fit inside the PCIe mechanical standard, for example, but they work.

> For example, color support as it is actually used in terminals violates the so called specification.

My terminal has fallbacks for a lot of modes. This is what backwards compatibility is for.

> Complete and utter drag on the ecosystem.

Sorry I don't see/feel it for the last 20 years.

So, in short, I agree to disagree, and genuinely wish more power to you in your endeavors. There are no hard feelings here, just tone-matching.

Hope to have a longer chat and have the opportunity to learn from each other.

Cheers!

[0]: https://media.startech.com/cms/products/gallery_large/dp2vga...

Re:Tmux is worse-is-better by aumerle on Wednesday May 29, 2024 @04:09AM (#40509628)
I'm going to ignore the personal attacks since you seem to want to genuinely learn something.

1) The difference between WezTerm's multiplexing and say tmux, is that wezterm's multiplexing supports all the same features/bugs/syntax and quirks as WezTerm itself. It does not have to translate between what it gets from an unrelated terminal implementation that it has only the most superficial information about to its own internal representation and back, which is what a multiplexer like tmux has to do. Tomorrow if Wez decides to add a new feature to WezTerm, he can add it to his multiplexer at the same time. Thus, the WezTerm multiplexer is a) much more robust than tmux b) not a drag on the entire ecosystem since nothing other than WezTerm itself depends on it implementing anything.

And therefore, unlike tmux, it is not a horrible hack.

To put it another way, tty's are sufficiently complex that multiplexing if needed at all, must be done by the terminal emulator, not an unrelated third party sitting in the middle. You say a multiplexer is another terminal inside the first, I say that is precisely the problem. It is an incompatible terminal emulator.

Re:Tmux is worse-is-better by setopt on Sunday May 26, 2024 @04:52AM (#40480647)
I wouldn’t call it “breaking standards” as much as “introducing new standards”.

The protocols introduced by Kitty, like the Kitty Graphics Protocol and Kitty Keyboard Protocol, were sufficiently well-documented that other modern terminals (e.g. WezTerm) have adopted them as well. Moreover, both protocols offer advantages cf. the modifyOtherKeys and Sixel standards used by e.g. xterm.

Re:Tmux is worse-is-better by colordrops on Saturday May 25, 2024 @02:25PM (#40476876)
Agree with all your points.

The main problem with Tmux that no one talks about is its arcane configuration and interaction patterns. If you set up a ton of config while gritting your teeth, it begins to work well, but the configuration semantics are a nightmare. I would love something similar to tmux that has sane configuration and theming. I switched from XMonad to i3 for the same reason.

Re:Tmux is worse-is-better by usrbinbash on Saturday May 25, 2024 @02:38PM (#40476963)
Sure, but how often do you need to touch that config?

Since I keep my configs in a repo, I just checked the last time I changed my `.tmux.conf`. Turns out it was 2018, and I changed a grand total of 2 lines. And I use tmux daily, not just remote, but also on my local machine.

So yeah, if I am using something for more than half a decade without requiring any change, then its pretty safe to say that whatever hassles the configuration of that something imposes, is completely irrelevant.

Re:Tmux is worse-is-better by kergonath on Saturday May 25, 2024 @02:50PM (#40477042)
> Sure, but how often do you need to touch that config?

It’s not only the config, though. It’s the arcane shortcuts and the weird way it seems to handle most things (trying to get the mouse working is a bloody nightmare and it regularly borks the terminal). I have a mouse with a scrolling wheel, for example. It works fine with most programs over ssh, why is it such a pain with tmux? Such pains remain even after having felt down the rabbit hole and spent 2 weeks tweaking settings.

iTerm2 is fantastic and I would be very happy to just use it and call the problem solved, but I don’t have a Mac at work.

Re:Tmux is worse-is-better by skydhash on Saturday May 25, 2024 @04:45PM (#40477712)
> trying to get the mouse working is a bloody nightmare and it regularly borks the terminal

It's literally one line of config.

> It’s the arcane shortcuts and the weird way it seems to handle most things

Tmux is a TUI and the shell and other software running on it are themselves TUI. There will be conflict and the prefix solution is actually simple. Tmux solves one particular problem and solves it well. It's on you if you want it to be something else.

Re:Tmux is worse-is-better by usrbinbash on Sunday May 26, 2024 @12:12PM (#40483261)
> It’s the arcane shortcuts

All of which can be configured.

Re:Tmux is worse-is-better by sigil on Saturday May 25, 2024 @02:55PM (#40477071)
> Sure, but how often do you need to touch that config?

More often than I’d like! tmux config has broken backwards compatibility on me multiple times over the years.

This is fine for most software — you upgrade your config once and you’re done. However, the nature of tmux is that I use it on many servers, some old and some new, some with tmux 1.x and some with 2.x. Getting a ~/.tmux.conf from my dotfiles repo that works across both has been papercutty.

Love tmux though & can’t imagine tty life without it — I run it locally as well as on remote machines.

Re:Tmux is worse-is-better by fl0ki on Saturday May 25, 2024 @04:48PM (#40477747)
It's interesting we've had such opposite experiences with tmux configuration.

My home git log shows my first tmux configuration was in 2017. Since then, several options have been removed, they now throw an error on startup, and mess with muscle memory for key bindings that are essential to using a program like this.

This means that to get tmux working properly again I have to catch up on years of release notes to figure out what I'm supposed to change. I have never once had to do this with screen despite using it for over 20 years.

Any time my muscle memory is betrayed, I give up and go back to screen and don't bother touching tmux again for several months.

Re:Tmux is worse-is-better by amluto on Saturday May 25, 2024 @05:02PM (#40477846)
I’m one of the people who much prefers tmux’s “session groups” over its “sessions”. Alas, as far as I know, it’s entirely impossible to configure tmux to get session groups by default: it’s a command line option, not a configuration option.
Re:Tmux is worse-is-better by em-bee on Saturday May 25, 2024 @05:33PM (#40478038)
i am running half a dozen tmux sessions without any configuration at all, and a few more where the only configuration is to change the key for tmux commands away from ctrl-b. i used to have several more of those, but i am no longer nesting tmux sessions as much.
Re:Tmux is worse-is-better by yoyohello13 on Saturday May 25, 2024 @06:42PM (#40478358)
Look into zellij
Re:Tmux is worse-is-better by setopt on Sunday May 26, 2024 @04:31AM (#40480559)
Have you tried `tmux-tilish` [1]?

It’s a tmux plugin that replaces the default Ctrl-b keybindings with the same keybindings used in i3wm (including turning on automatic tiling instead of manual splitting). Given that you use i3wm on your desktop, you might like it :)

[1]: https://github.com/jabirali/tmux-tilish

Re:Tmux is worse-is-better by biftek on Saturday May 25, 2024 @05:08PM (#40477890)
The argument about parsing twice doesn't seem very good to me. Vim and emacs are also parsing keystrokes, should we abandon them too?

The cynic in me thinks it's more likely that because kitty offers tmux features he wants to lock users in to his product.

Re:Tmux is worse-is-better by ehPReth on Saturday May 25, 2024 @05:27PM (#40478003)
Re:Tmux is worse-is-better by ckolkey on Saturday May 25, 2024 @05:48PM (#40478125)
Not that KiTTY, this kitty: https://sw.kovidgoyal.net/kitty/

But it's also foss, so, you're still right.

Re:Tmux is worse-is-better by Repulsion9513 on Saturday May 25, 2024 @07:25PM (#40478594)
> Offloads rendering to the GPU for lower system load

My God, what have we done

Re:Tmux is worse-is-better by mrgaro on Sunday May 26, 2024 @01:59AM (#40480065)
What's wrong with that? Computing history has a lot of machines with various co-processors which are used to offload various things from main CPU. Just as an example: Amiga and C64 had both co-processors for rendering text faster.
Re:Tmux is worse-is-better by aumerle on Sunday May 26, 2024 @12:00AM (#40479700)
Keystrokes!! Way to come up with a strawman. Every byte that the program running inside tmux send to the terminal has to be parsed and re-interpreted by tmux first and then the actual terminal. Same for every byte that the terminal sends the program running inside it. These include every byte used to redraw the screen, which with modern full screen applications like editors can be several kilobytes per screen refresh. Keystrokes indeed. This reduces throughput by a factor for 2 at a minimum, reference: https://sw.kovidgoyal.net/kitty/performance/#throughput see the table entries for alacritty vs alacritty+tmux. And that is just throughput, tmux will affect latency as well, though I dont have a reference to measurements handy at the moment.
Re:Tmux is worse-is-better by jauntywundrkind on Sunday May 26, 2024 @12:31AM (#40479793)
Just off the wall crazy shit dealing with absolutists like this.

Yes efficiency is good. But... Damnit man! The performance numbers shown for this low power processor are 43MB/s without tmux vs 30MB/s with tmux. It's likely going to take a lot of activity for that to aggregate into even a decent fraction of a ms of latency.

Beware extremists. Some people will never be pleased, will accept nothing. The only answer is to cut cut cut forever. There's a cult of people out there that idolize performance above any practical use like a god & will destroy & savage anything else. Deny this falsity. Respect performance, but also allow other factors to balance in.

(Side note: I'd love to know how dtach performs. It has the key advantage to me of tmux, which is detachability, but no virtualization. Great for running a vim session! And by design is a very pure simple pass through.)

Re:Tmux is worse-is-better by aumerle on Sunday May 26, 2024 @01:06AM (#40479891)
First I dont know what table you are looking at, but its 54MB/s vs 24 MB/s on average across different data types. That's a factor of 2. Aka half the throughput. I dont know what kind of performance engineering you do, but a halving of throughput is a pretty serious performance regression where I come from.

Also, latency is not a direct function of throughput. The two are separate. In this case the latency will come because when you have tmux in the middle it means your command line program writes to a pipe, which is a buffer in the kernel. tmux then has to read from that pipe, then it has to process that byte updating its internal state, then it has to generate the output bytes based on the internal state, those output bytes are written to another pipe, and finally the terminal reads from that second pipe.

There is a whole extra pipe with associated context switches for every byte (or more accurately every packet since reads/writes on a pipe are buffered). This will add latency for example for every keystroke no matter what the throughput numbers are. A pipe operation requires a poll on the pipe fd which is a context switch. Apart from whatever internal processing tmux does, there are four extra context switches added for every keystroke + response.

Re:Tmux is worse-is-better by lemonwaterlime on Sunday May 26, 2024 @08:15AM (#40481581)
The table you linked is chopped off on mobile. So you are looking at the last column and the person above is looking at the first column.

Also, why have you done an “alacritty” vs “alacritty+tmux” benchmark yet have not done a “kitty+tmux” benchmark on this same table? That’s a big omission. The entire conversation is about the effects of adding a multiplexer on top of a terminal.

Re:Tmux is worse-is-better by aumerle on Monday May 27, 2024 @12:02PM (#40492012)
I didnt do the table go ask the kitty developer why he did that. Or just read the notes under the table where he tells you why he included alacritty+tmux.
Re:Tmux is worse-is-better by jauntywundrkind on Monday May 27, 2024 @12:15PM (#40492150)
Yeah very weird article, having so many benchmarks but not testing the main thing they are griping against except in one case.

I chose the ASCII column because it's 99.999999% of what 99.9999% of developers see.

Re:Tmux is worse-is-better by arguingwith on Sunday May 26, 2024 @02:22AM (#40480131)
> Yes efficiency is good. But... Damnit man!

You’re arguing with a brick wall. The same people that demand performance-at-all-costs are the same people that copy-n-paste shit code around 30-40x, avoid any semblance of software engineering patterns, etc all because “performance”

Sure. Everything shouldn’t be an electron app, but there’s huge gray area for a balanced response. :eyeroll:

Re:Tmux is worse-is-better by mmis1000 on Sunday May 26, 2024 @02:32AM (#40480161)
> parsing each keystroke twice

I think it's an unavoidable cost for any remote re-attachable system. No matter it's tmux/vnc/whatever remote protocol. But even in all these options. Tmux is still the lightest weight among them. Which can runs on a 500mb-memory vm totally fine. Spin up a actual desktop is way way more heavier than a terminal emulator like tmux. And allow you to split the terminal is just a free bonus tmux provided.

In an ideal world, connection can live forever, so re-attachable protocols like those are totally unnecessary. But in reality, the network sucks often.