Live data from Hacker News

Make tmux pretty and usable (2024)

hamvocke.com

201–210 of 285 posts

Re: Make tmux pretty and usable (2024)

#201

Earlier quoted context omitted.

The only (deal breaker for me ) weakness of zellij - doesn't support copy/paste from the keyboard (from the screen/scrollback) and doesn't support multiple copy/paste buffers. I do that roughly every 60-90 seconds with tmux - so, until the zellij developers relent (they suggest the "proper way" of copy paste is to pipe the data into a text editor and use that - but has the downside of not supporting system copy-paste…

Zellij has some controls for how copy/paste is handled. Perhops these could help you in the future? Link: https://zellij.dev/documentation/options.html#copy_command

It does - and we spent an hour or so reading through the code and affordances to see if there might be a possible path.

The general response is that this user behavior, selecting/copying/saving-in-named-buffer is a very "tmux" like usage pattern the Zellij authors don't want to encourage in Zellij. Instead -they suggesting bringing your preferred Text Editor (emacs, vim, etc...) and doing the select / copy /paste in that.

The problems for me are - (A) I know how to select/copy/paste very well in tmux. Don't have the faintest clue how it's done in a text editor, (B) No (easy) ability to have multiple named buffers if you use a text editor, etc...

I summarized them here: https://github.com/zellij-org/zellij/issues/947#issuecomment...

Re: Make tmux pretty and usable (2024)

#203
post #39

If you're interested in an out of the box multiplexer. https://zellij.dev/ is great. I've been using it for about a year now and loving it.

Your out of the box isn't my out of the box. Tmux is in main on OpenBSD, where it started.

I read "out of box" as meaning "has sensible defaults, can be used 'out of the box' without configuration".

I've never seen it used to mean "preinstalled on most systems". Although e.g. people like vi keybindings because vi is preinstalled on most systems.

Either way, I think you can argue for workstations, it's worth configuring software to your liking, and worth installing software that helps you be productive.

Though, the only software I've seen people excuse for having 'bad defaults' have been things like vim, emacs, tmux.

Re: Make tmux pretty and usable (2024)

#204
post #3

I gave up on it once I discovered https://zellij.dev/ Just even for how tab and panes are setup, and how it's good for scrolling and text selection with your mouse for copy pasting.

Just use byobu, zellij does weird things, byobu just uses tmux (or screen) and has a sane mouse TUI

Re: Make tmux pretty and usable (2024)

#205
post #189

Earlier quoted context omitted.

TIL. I didn’t know it’s the responsibility of the parent, thought OS automatically handles child processes.

When a child process finishes (that is not actively being waited on) it is left in a "defunct" or "zombie" state and will stick around in the process table until the parent process waits on them to fetch exit code. When you kill a parent process with active children, these subprocesses will become orphaned and re-parented to the OS pid 1 (or another "sub-reaper" process depending on your setup). The OS will typically…

I see, so I might still need to hunt down non-daemon but hung processes even after I kill tmux server in which I ran them. Might explain a couple of odd occurrences in the past…

Re: Make tmux pretty and usable (2024)

#206
post #3

I gave up on it once I discovered https://zellij.dev/ Just even for how tab and panes are setup, and how it's good for scrolling and text selection with your mouse for copy pasting.

I have a few embedded devices where flash space is limited. tmux is so much smaller than zellij, and it's not even close. Zellij is close to 50 megabytes, but tmux and all dependent libraries (minus libc, it's always there) is about 2 megabytes.

> Zellij is close to 50 megabytes,

That's a Rust thing. It's what happens when you statically link because you monomorphise everything.

Re: Make tmux pretty and usable (2024)

#207
post #193
post #142

Earlier quoted context omitted.

Once I discovered window managers and graphics, I stopped using half-baked features to emulate them in the terminal. I use tmux to reattach to programs after the network connection dies, and not really anything else. I would welcome a version of it that stripped out everything but that, and just replayed the last few pages of scrollback on reattach.

I use tmux for everything because I work in a headless VM where a WM isn't available.

You don't have a window manager hosting the terminal window on your host OS? That's the argument being made here, you're already in some kind of tiling or windowed environment, why replicate all of that on the remote?

Re: Make tmux pretty and usable (2024)

#208
post #13

I stopped using tmux when I started using kitty terminal with native split windows. I prefer the native window management of kitty, but I do miss the session saving of tmux (e.g. if I accidentally close a tab).

Check out: https://github.com/neurosnap/zmx

It uses libghostty to restore scrollback history and terminal state.

Re: Make tmux pretty and usable (2024)

#209
post #38

I would love to have a way to switch sessions easily, like with panes where I just click or have more shortcuts available

i just have a little script called session (invoked as session namespace name and mapping to a tmux session called namespace/name and searching all namespaces if the namespace is elided) that just does the right tmux invocation for the various intersecting cases of [in or not in a tmux session already, target session does or does not exist] which also has the side benefit of leaving shell history breadcrumbs i can follow between sessions later if needed

Re: Make tmux pretty and usable (2024)

#210
Though I also customize my tmux setup, the best way to use tmux is just to learn and remember the basics. Once you change the prefix bind or any other basic binds, you will have hard time on a new machine.

Btw, you can place tmux config at ~/.config/tmux/tmux.cong. No reason to clutter home dir.

Post reply on HN