Live data from Hacker News

Make tmux pretty and usable (2024)

hamvocke.com

41–50 of 285 posts

Re: Make tmux pretty and usable (2024)

#41

Earlier quoted context omitted.

I used tmux for a few years, until one day I discovered Zellij. With its significantly better UI and overall user experience, I was instantly convinced.

Can you use zellij over ssh on a remote server?

Yes you can!

Re: Make tmux pretty and usable (2024)

#43
post #32
post #17

I had my tmux customized to the point I forgot how to use it on a clean install which is a problem when I'm sshing into a server. I wish it had better defaults but now I run it as is. After a while you get used to it. The only thing I always have to change is the mouse scroll and my brain cannot retain the exact command.

Why not just `scp ~/.tmux.conf remotehost:`?

Sometimes I ssh into a server as a specific user (e.g. as the "app" user that is used to run a web app), sometimes only root is available (probably not best practice, but it's not like I can or want to fix it myself).

In any case it's not practical to carry your dotfiles everywhere you go. Changes are also a hassle to propagate

Re: Make tmux pretty and usable (2024)

#46
post #32
post #17

I had my tmux customized to the point I forgot how to use it on a clean install which is a problem when I'm sshing into a server. I wish it had better defaults but now I run it as is. After a while you get used to it. The only thing I always have to change is the mouse scroll and my brain cannot retain the exact command.

Why not just `scp ~/.tmux.conf remotehost:`?

I can't speak for the parent, but I rarely login to the same remote server twice and don't want to need to set things up and clean them up anytime I do. This is why I try to keep my stuff as close to vanilla as possible. If anything goes wrong on a server and someone sees I have a whole bunch of dot files to customize my config, it becomes a red herring that I have to spend time explaining away.

Re: Make tmux pretty and usable (2024)

#47
post #12

I like having a red bar for tmux running as root and a blue one for running it as a normal user, e.g. for root: set -g status-style "bg=red" I also like to have the bar on top and the status centered: set -g status-justify absolute-centre set -g status-position top

I change the color of the bar in every server I've set it up so I know absolutely where I am.

Aren't you going to run out of colors to pick?

Re: Make tmux pretty and usable (2024)

#49
I left tmux for zellij after several unsuccessful attempts to get Shift+Enter working.

Was quite impressed initially and invested weeks in building new muscle memory, but somehow Zellij crashed with panic more than once, leaving all my processes orphaned. Decided to go back to tmux, and found a simple fix for my Shift+Enter issue.

In case anyone is looking for it, the fix is "bind-key -T root S-Enter send-keys C-j" borrowed from https://github.com/anthropics/claude-code/issues/6072.

Re: Make tmux pretty and usable (2024)

#50
I use c-q for prefix key because it doesn’t conflict with common zsh and vim bindings.

Because the author suggested swapping caps lock and control key, I also recommend mapping escape key at the control key and change the behavior based on whether another key is pressed. For example, if you press control + a, it sends c-a, but if you only press control key and then release, it sends escape. It makes your vim life (and in general) a lot easier. You don’t have to compete the most variable real estate on the keyboard, right next to the A key.

For most bindings like moving, resizing, and splitting,I emulate vim bindings.

Also, -r flag for bind-key command is impotent, because it enables to repeat commands like changing the pane size or move focus. You don’t have to press prefix key each time.

If you want to get fancy look with minimal setting, use plugins like nord tmux theme.

Post reply on HN