Live data from Hacker News

Using tmux properly

danielallendeutsch.com

71–80 of 218 posts

Re: Using tmux properly

#71
post #33

Yesterday I was helping a friend setting a box with no graphical session: I fired up tmux in the linux virtual terminal and then proceeded to realize without my tmux.conf I couldn't do a thing because I have always been using entirely different keybindings from the default. This is the problem with too much customization. Learning to use the default configuration may be difficult but it's probably worth the effort, f…

It gets worse when you work in ops and are constantly needing to remote into servers and you regularly have tmux within a tmux within a tmux... Littering config files across the datacenter just isn't an option.

Actually this benefits me, having identical settings in my nested session means typing :send-prefix all the time... remembering how to use tmux with default settings makes life easier.

Re: Using tmux properly

#72
I use tmux constantly but I barely know three tmux commands. Get all the benefit with none of the cognitive overhead with `tmux -CC` in a supported terminal (like iTerm). It allows the GUI program to take charge of the windowing and paneling in its own native way. It's lovely.

Re: Using tmux properly

#73
post #33

Yesterday I was helping a friend setting a box with no graphical session: I fired up tmux in the linux virtual terminal and then proceeded to realize without my tmux.conf I couldn't do a thing because I have always been using entirely different keybindings from the default. This is the problem with too much customization. Learning to use the default configuration may be difficult but it's probably worth the effort, f…

What i would like is to be able to extend terminal protocols to allow client side dotfiles that could be loaded in preference to the host dotfiles.

Limited to user prefs, Key bindings etc.

Wouldnt solve everything but would address the basics.

Re: Using tmux properly

#74
post #60

Earlier quoted context omitted.

The problem is, my terminal already has a concept of scrolling, and its own concept of a buffer, with its own concept of keeping unlimited contents based on available memory, etc. I've never seen a tmux setup that doesn't fail horribly when these two concepts collide (I can't cmd-f search the buffer for interesting things, I don't get a scroll bar on the right that shows me how far up the buffer I am, scroll accelera…

> The problem is, my terminal already has a concept of scrolling, and its own concept of a buffer, with its own concept of keeping unlimited contents based on available memory, etc. Perhaps try iTerm2 (for Mac) native tmux integration. You can have tmux panes and split panes that are (and behave like) regular terminal panes and tabs.

That program is so disgustingly good it was almost the sole reason I bought this generations macbook pro.

If any terminal emulator programmers are listening cough konsolecough please consider following the same method of integration <3

Re: Using tmux properly

#75
So this may mark me out as different, but apart from persistent remote connections, I've never really felt the need for screen/tmux.

I've been trying to figure out what the fuss is about, and I still really don't understand (apart from persistence and screen sharing.)

When I want multiple terminals, I just fire up another terminal window and hey presto, jobs a goodun. I have a fairly high res screen and small fonts, so I can fit many terminals on one screen. If I run out, I hop over to a new virtual screen.

Perhaps this is a by product of working in linux/unix so long? I can imagine that if I was forced to use putty, where connection setup is costly and screen space scarce, I'd want tmux to make things quicker.

What am I missing?

Re: Using tmux properly

#76
post #46

Earlier quoted context omitted.

I 120% agree. I once lost my emacs dotfile and suddenly i was almost unable to use Emacs on my own pc. Since then, i've decided to apply as little customisation as possible to software I use, and read the documentation and learn the standard configuration instead. For some reasons nowadays it's trendy to add colors, bells and whistles to things but I've found out that learning the standard/default configuration lets…

That's why I have public dotfiles. Also this situation happens rarely. The whole beauty of software is that you can customize it and make it your own. The only downside I see with customization is that it can be huge timesink. I guess to each his own, but I think you're really missing out. P. S. Backups.

Regardless of the frequency of such a situation, it can really bite you when something big breaks and you need to ssh into a vanilla server in the middle of the night under pressure. Trying to fix a production fire under the gaze of an angry CEO is stressful enough, but not being able to take care of business on a box because of a missing personal config is truly one of the worst experiences I've ever had in this business.

It's only happened to me once, but that one experience made me take a really hard look at my workflow, and years later, I have no regrets about scaling back my configs. I guess it really just depends on your job and on-call/firefighting responsibilities.

Re: Using tmux properly

#77

So this may mark me out as different, but apart from persistent remote connections, I've never really felt the need for screen/tmux. I've been trying to figure out what the fuss is about, and I still really don't understand (apart from persistence and screen sharing.) When I want multiple terminals, I just fire up another terminal window and hey presto, jobs a goodun. I have a fairly high res screen and small fonts,…

I have a heavily-tweaked Tmux that uses a lot of custom bindings but also incorporates Powerline to make the status bar helpful and homely. I spend so much time in the terminal and only Tmux can really personalize it. It looks good, and it feels like a good place to work. It's no big deal, having the time, date, current song, weather etc all there to see, but it is a pleasure to have.

A terminal that be made to feel like /home? Oh yes!

Re: Using tmux properly

#78

So this may mark me out as different, but apart from persistent remote connections, I've never really felt the need for screen/tmux. I've been trying to figure out what the fuss is about, and I still really don't understand (apart from persistence and screen sharing.) When I want multiple terminals, I just fire up another terminal window and hey presto, jobs a goodun. I have a fairly high res screen and small fonts,…

Vim + tmux with custom bindings makes moving between vim and a terminal seamless. The same keystrokes for moving between panes in vim can be used to move to tmux panes. Also, as a vim user I loathe to reach for the mouse, so having quick and easy keybindings for launching and arranging tmux panes is great and preferred to the imperfect and slow arrangement using a mouse. Lastly, I can have tabs and window panes that are named and in consistent locations and persisted across sessions, so I can immediately jump around a dozen projects without much cognitive load. Try having 15 terminals open and remembering which is which and you'll find there is a high context switch cost, so you constantly have to close and open terminals. This isn't the case with tmux.

Re: Using tmux properly

#79

I basically use tmux as my window manager. I only typically open two programs: a browser, and a terminal. Both are always in full-screen mode. It makes things nice and simple. No matter if I'm working on a laptop or a desktop, all my terminal windows end up in the same place and have the same settings. It's great!

If you are already going that far, why not just switch to a tiling window manager?

They are not mutually exclusive. I use xmonad, tmux, and vim together. Tmux adds some niceties on top of xmonad like shared keybinds with vim making moving across vim panes and terminals seamless. Also, I can jump on my macbook and login to my desktop using mosh and re-attach to the tmux session and continue working where I left off.

Re: Using tmux properly

#80

I basically use tmux as my window manager. I only typically open two programs: a browser, and a terminal. Both are always in full-screen mode. It makes things nice and simple. No matter if I'm working on a laptop or a desktop, all my terminal windows end up in the same place and have the same settings. It's great!

If you are already going that far, why not just switch to a tiling window manager?

I do, but...

If I'm on my laptop, then switch to my desktop, a twm doesn't save my sessions. Tmux on a remote machine does.

Post reply on HN