Hacker News new | ask | show | jobs
by _ix 3172 days ago
This looks really nice!

It's not for me, though. Maybe I'm not a very good systems engineer, but I've got a decent .tmux.conf. Between writing automation and trying to make sense of the mess I've inherited, I'm constantly splitting, resizing, and re-adjusting my work space to suit the task at hand.

3 comments

+1 The mnemonics that come with tmux are short and intuitive enough such that everything ive needed is just a ctrl+b away. Curious what the use case is for this
Example where I would have needed this a while ago:

After almost every reboot on my laptop I start a tmux with a certain layout with some semi-long-running processes which I want active and not daemonized, I can also not start them at the same time. I start them in a tmux with the layout split into 4 quadrants, then create a single new window so I don't see them all the time and can work there.

Took me at least 2h to figure that out, how to split it programmatically and start everything in the correct "corner". Now it's just running a script and not having to anything manually.

This would have probably saved me 2h. And I have totally forgotten everything again now, so much for "just a ctrl-b" away. (Using tmux daily, but not in THIS way)

Thanks. I'm also constantly resizing and re-adjusting my work space for which I have binded keys in my .tmux.conf. Cockpit helps me get started :)
what are the pros and cons to using tmux as opposed to say multiple instances of a terminal emulator split up using ratpoison?
The one major advantage is preserving sessions and re-attaching to them later, e.g. when you're ssh'ed into a remote machine or VM and you don't want to lose your setup.

Ratpoison could possibly be better (I keep meaning to give it a shot), although one thing I really enjoy about using tmux is being able to quickly open, shuffle, reorganize, and close panes with only the overhead of starting a new shell.

I happen to be a vim user. tmux, vim, vim-tmux-navigator, and some comfortable configurations in .vimrc and .tmux.conf can be a force multiplier for one's workflow. If you like vim, then it makes a lot of sense. If you don't, there's still probably some merit, but, maybe less of an incentive.

I've never used ratpoison, but just read into it. Sounds pretty great, actually. If the key bindings are simple enough, I suppose it could be pretty similar. But, as a sibling comment pointed out, it works most everywhere. Where I go, my configuration comes with me.

pro: use anywhere, including while ssh'd, and share sessions with others. con: not that easy to use -- kind of like vim or emacs.

I personally use tmux because it's "one window" and it is supported on every environment I can think of.

Big con for me: scrolling sucks. Even o latest 2.x, which is indeed better, but still light years away from native.
When you say scrolling, do you mean with something other than a keyboard?

I thought this is something I wanted, but when I finally got around to getting mouse inputs working the way I thought they should, I realized that mousing around a terminal is kind of weird. Granted, I still use my mouse for copy/pasta operations, but I hope to eventually break that habit in time.

What's your workflow with tmux like?

Nowadays, it's basically a simple way to let process running after existing the shell and reattaching later, for me.

But I had much greater ambitions in the past which I've given up mostly due to scrolling, clearing scrollback inserting a bunch of whitespace instead of actually clearing, etc.

I scroll with the mouse a lot, it's more tolerable with the keyboard, but it's still not as good as native interaction.

It also messes with the colors sometimes. For some reason, screen doesn't.