Top
Best
New

Posted by speckx 3 days ago

Make tmux pretty and usable (2024)(hamvocke.com)
454 points | 278 commentspage 4
shye 3 days ago|
What I don't see discussed is why tmux (and screen) are still a thing, when we have windowed desktops for 40+ years now.

Disconnecting a session's lifetime from the connection's lifetime hardly need such lengthy tutorial.

And displaying and arranging multiple virtual terminals was supposed to be the job of the terminal emulator and the windowing system.

em-bee 2 days ago|
windowed terminals and tabs don't keep their state without something like tmux. and they don't let me have multiple terminals on a remote machine.

only now we are seeing gui terminals to integrate such features: wezterm, ghostty, ttypoon, ... so we are discussing tmux because it took more than 40 years for those features to make it to the gui layer.

towb 3 days ago||
Gave up on making it pretty... But my tip is to read the manual so you know what you put in your config instead of just copy paste.

I love tmux, does exactly what I need it to do and doesn't try too hard to make the terminal a place with unicorns and fancy GUI magic.

monological 3 days ago||
The only reason I don't use tmux is because of how annoying it is to look at scrollback. Am I using it wrong?
lancebeet 3 days ago||
I would "just" do C-B PgUp and then use vi-like movement keys like hj, gg/G etc., and q to escape the pager, but I realize now that I say it that it doesn't sound very convenient or discoverable.
client4 3 days ago||
C-b [ allows you to scroll up/down
toniantunovi 3 days ago||
One thing that often gets overlooked in the tmux vs. alternatives debate is that tmux's staying power is largely about ubiquity on remote servers. Zellij is great on your local machine where you control the environment, but if you're doing a lot of work via ssh on machines you don't own, tmux is almost certainly already installed. The muscle memory transfers too.

That said, I'd push back on the idea that the default tmux config is just "ugly". The real usability issue is that the keybindings are so divorced from how people intuitively think about splits and windows that even experienced users can't remember them. The visual defaults are just a symptom of the deeper problem that it was designed for someone who already had a mental model built around screen.

amdivia 3 days ago||
My main gripe with tmux is the nested use case (tmux session on my local machine, in which I ssh to another machine, only to tmux attach within the remote machine too). Is there a terminal multiplexer/session daemon that supports nested sessions out of the box with ease?
she46BiOmUerPVj 3 days ago|
I wrote quite a bit of configuration to support an "outer" tmux process and "inner" tmux processes on all the remote hosts I have various and different tasks to accomplish. I am not sure how some software would manage these, but in the very least configuring my outer session to use Ctrl+a while the inner one uses Ctrl+b is working well. I have aliases that specify a socket so I can refer to the sessions easily and not get them confused.
pythonbase 2 days ago||
I have used tmux, tmuxup, fzf and direnv to automate my workflow. It's pointed to the work folder, contains a project picker, invokes shell with defaults (npm run dev, python manage.py runserver etc), and fires up cursor - saving a lot of keystrokes for project initialization.

I have written about the process here: https://kashifaziz.me/blog/tmux-dev-workflow/

bsdz 3 days ago||
At some point I switched to "oh my tmux" which seems to cover most of the customisations I needed https://github.com/gpakosz/.tmux
moontear 3 days ago|
+1 for gpakosz/.tmux which I also wanted to mention here. I have it synced across all machines and a personal .tmux.conf.local that modifies some settings to my liking.
post-it 3 days ago||
I appreciate that tmux has theoretical advantages over screen, but man does the implementation suck. On Mac it still seems like there's no way to copy text if you have mouse mode on (at least in code-server).
adamors 3 days ago||
Select copies, what do you mean?
post-it 3 days ago||
Not for me. Some kind of OSC 52 problem.
szopa 3 days ago|||
Yeah, that really sucks. I couldn’t quite believe what was the case and spent many hours trying to debug it.
ramses0 3 days ago|||
Often, holding down "Shift" while making mouse selections will "break through" and let you get at the O.S. copy/paste/selection mechanism. Highly terminal dependent, though!
post-it 3 days ago||
Not in browsers, unfortunately. Both my work and Home Assistant OS use tmux in a browser tty, and I have to turn off mouse mode to copy.
ihowlatthemoon 3 days ago|||
Maybe you could try this - https://github.com/tmux-plugins/tmux-yank
post-it 3 days ago||
I haven't tried it, but it looks like it just calls pbcopy, which won't work in a browser. There's no programmatic way to do it, because tmux can't access the clipboard.
chasd00 3 days ago||
I was wondering about tmux vs screen (+splitvt) but didn’t want to ask. What are the advantages?
linzhangrun 3 days ago||
The scrolling behavior in tmux has always annoyed me. Every time I have to press a shortcut to enter copy/scroll mode, and then exit it again. At the same time, using Ctrl+A to select all is always cumbersome.

In modern TUI editors, scrolling and select-all don’t seem to be issues at all. I can use them almost unconsciously in a way similar to GUI applications—for example, Micro or TUIs from OpenCode. Does anyone know how to solve these problems?

wormius 3 days ago|
I gave up on Tmux due to issues w/reboot & session storage not working after.

I used the resurrect and continuum (one to save/restore, the other to save between sessions). Everytime I would reboot, the sessions no longer worked, and I'd have to delete the saved sessions.

Just trying to use Wezterms tabs panels like windows/panels. I don't do the SSH Session save/restore from remote so don't need that feature, and thus not too worried.

More comments...