logoalt Hacker News

Make tmux pretty and usable (2024)

445 pointsby speckxlast Monday at 2:48 PM273 commentsview on HN

Comments

0xDEFACEDlast Monday at 4:04 PM

my favorite thing to do with tmux is using a sessionizer script[0] (credit for the idea/original implementation goes to ThePrimeagen). allows for fzf-ing my projects and creating a separate session for each one. especially handy for bouncing around when working on features/fixes that span multiple repos

for (neo)vim users, flattening vim splits and tmux panes into the same level for switching with ctrl+hjkl is handy too

[0](https://github.com/tolly-xyz/dotfiles/blob/main/.local%2Fbin...)

5-0last Monday at 4:59 PM

> Published on Aug 17, 2015 > Last updated on Oct 2, 2024

Why now?

At least some of the links in it don't mention plugins (which luckily some comments here do). Beside tmux-continuum and tmux-sensible, I'd recommend jaclu/tmux-menus.

OhMeadhbhlast Monday at 4:49 PM

I'm perfectly happy with tmux the way it is, but upvoting this one because it's a decent overview of what to modify to make tmux more better if you don't like its defaults.

avadodinlast Monday at 10:22 PM

I don't see what's awkward about C-b and %.

No mention of replacing the weird-ass emacs thing on [ with proper vim bindings?

hleszeklast Monday at 4:21 PM

I love tmux but one thing which really annoys me is the fact that I cannot use the mouse wheel or the scroll back to see the previous content. I know there are shortcuts to go forward and back but I always forget them and they are not easily accessible on my keyboard and cumbersome.

show 1 reply
jackbravolast Monday at 5:53 PM

Another easy to use option is using byobu (https://github.com/dustinkirkland/byobu).

show 1 reply
kristianpaulyesterday at 2:00 PM

Try byobu

tombertlast Monday at 4:02 PM

I almost never bother theming things on my computer; I usually don't really care about how things look and I can't be bothered with it.

I have two exceptions to this: NeoVim and tmux.

tmux in particular looks very ugly out of the box; I'm not sure why they decided to have a bright green bar on the bottom (presumably to be high-contrast in a low color terminal), but I really hate staring at it all day (since I kind of live in tmux most of the day on both my work and personal computer). I have it set as close as I can to the Wombat color scheme that's built into emacs (and which can be easily added to Vim), because I personally have always felt that that was the most pleasant theme to stare at for long periods of time.

Another thing I do is set the prefix key to backtick. I have no idea why I started doing this, but at this point I'm too geriatric to change, and I still greatly prefer this over ctrl-b. The only issue I've had is when I need to do code blocks in markdown, but I've just gotten used to hitting backtick twice when I need to actually use a backtick.

hybirdsslast Monday at 4:01 PM

feels wrong to scp a dotfile to a server you only touch once

kristopolouslast Monday at 3:47 PM

Worth mentioning my tmux llm chat helper sidechat: https://github.com/day50-dev/sidechat

I use it every day.

ggmyesterday at 6:49 AM

Make tmux cut/paste work on mac terminal.app so I don't have to install iterm2 bloatware.

show 1 reply
faangguyindialast Monday at 3:23 PM

i used to use tmux a lot when i used to develop on arch, since i moved to macos i never installed it.

tbh i even forgot what it used to buy me.

capitainenemolast Monday at 3:39 PM

I've had the ctrl-a setup ever since migrating from screen to tmux, just due to muscle memory. But it is more conveniently located than ctrl-b - it's also rather nice if I have multiple nested layers of tmux due to temporary ones on other hosts. Sure you can just keep repeating the bind, but, just remembering that the second layer uses ctrl-b is a bit more convenient I feel. Slows me down a little, but usually I'm not using the 2nd layer as much.

I don't use capslock for ctrl though. It's much too useful as the Compose key ;)

Lihh27last Monday at 3:44 PM

the most tmux thing in the world is that "make tmux usable" is still a genre.

imiriclast Monday at 4:04 PM

I've used ` as prefix for years now. Considering how often you switch windows/panes, I reckon using a single character has saved me hours per year. :D

It rarely conflicts with whatever I'm doing, but I have a binding to temporarily switch it to `C-a` and back, which I almost never use.

Oh, and I've used this themepack[1] for years as well.

Actually, here's my config[2] if someone finds it useful. I can't claim ownership of it, and probably stole it from somewhere I don't remember anymore.

BTW, the author's site https://rootloops.sh/ is certainly... something. :)

[1]: https://github.com/jimeh/tmux-themepack

[2]: https://gist.github.com/imiric/9bd3e5b7fc5e1468d05abc674f42e...

mrexcessyesterday at 12:58 PM

Rebinding C-b to C-a is a necessity for those of us whose muscle memory formed on GNU screen, been doing this for years. I like to set status-right to include host load average, with something akin to:

set -g status-right '#[fg=colour39, bg=colour234]#[fg=colour160] #h #[fg=colour088]avg: #(cat /proc/loadavg|cut -d" " -f1-3) '

semiinfinitelylast Monday at 10:01 PM

set-option -g prefix C-x

has been working for me for years

garymikloslast Monday at 4:15 PM

Just use smux.dev

halyconWaysyesterday at 4:41 AM

Did they fix being able to select text without a ton of empty spaces across multiple lines, and being able to use the mousewheel as effectively as a non-multiplexed terminal?

nurettinlast Monday at 6:51 PM

I remember running ssh to connect to a mainframe and starting gnu screen remotely right after watching the matrix. And I've used it ever since.

All these newage tmux hippie yuppies can get off my lawn.

znpylast Monday at 4:55 PM

As a long time user of gnu screen (almost fifteen years now) i still have on my todo list to come up with a tmux config that mimics gnu screen… does somebody know if such a thing exists already?

Btw I don’t strictly believe in a gnu screen superiority, i’m just lazy.

show 1 reply
Ravitej_Neelilast Monday at 3:21 PM

nice update on tmux

troupolast Monday at 3:41 PM

I ended up AI-slopcoding myself a small shell script for the few things I need from tmux: https://gist.github.com/dmitriid/523a5229c9a17a1cf4ad9182f4c...

I just couldn't be bothered to remember all the prefixed commands :)

0daymanlast Monday at 2:50 PM

that's pretty nice, but did you try cmux.com

show 3 replies
_345last Monday at 4:18 PM

I actually asked chatgpt to recommend me a great starter tmux conf, and it gave me 80% of this blog post. Not an insult btw.