Reader of that book, you finally got me to kick my screen habit with it and now I have a new tmux addiction.
That said, tmux is way easier to use compared to screen. And with 1.8 and text reflow it pretty much has every feature from screen I ever wanted/needed/used.
Is there an option/way to have "lables" in panes. Just like you have a info bar for windows, I would love to label my panes.
Normally have a bunch of panes setup for logs, and it would be really nice to label them so i could tell what is in each pane.
I'll take every opportunity to just praise you good sir, and gush over your wonderful book. Because it is indeed a wonderful book. It sits happily on my shelf.
Can you make it cheaper to buy both ebook and the print book? Ideally, I would have hoped that the ebook would come free with purchase of a print book…I would really like to buy both
unbind [ # free the weird binding
set-window-option -g mode-keys vi # switch to vi bindings
bind Escape copy-mode # ctrl-a ESC put your pane in a kind of vi normal mode
bind-key -t vi-copy v begin-selection # start a visual select mode with v like in vim
bind-key -t vi-copy y copy-selection # yank with y
unbind p # free another weird binding
bind p paste-buffer # paste with crtl-a p
I'm guessing this is autocorrect, but an autocorrect that knows 'pneumonic' (the Firefox spell-checker doesn't!) but not 'mnemonic' seems even less likely than a person who knows the first word but not the second.
Anyway, 'previous' is perhaps less likely to spring to mind than 'back' or 'reverse' or even 'last', each of which would have different mnemonics. ('Last' has a particularly good mnemonic if you keep your hands to the Holy Home Row, which is why vi users, who are most likely to worship at the Altar of the Home Row, can't use it.)
previous is unambiguous. Last is extremely ambiguous. Last = Nth element or current -1? Similar with back or reverse. Previous means N-1 every time. Also it's a pretty commonly used programmer idiom.
I've used tmux so much in the past... so much that the only thing that my OS would do is run tmux ;-) So I've decided to use a different window manager: StumpWM. So, in a nutshell, all my window manager is now a big tmux - and I run browsers fullscreen in some screens. That's the best coding setup I've ever had.
I highly recommend byobu - http://byobu.co - which front ends screen or tmux. It uses the function keys for switching around, gives a good status bar by default etc.
The last tip on naming windows after remote hosts is nice! Now it'd be nice if we could run similar to ssh's LocalCommand on exit too. Turned out that I'm not the first to ask this: http://unix.stackexchange.com/questions/40899/ssh-localcomma...
With workaround too.
The downside is that if go like ssh A then ssh B, display doesn't update. But I don't this too often anyway.
I spent a bit of time trying to figure out why it didn't work for me. Then why I couldn't even do the usual echo -e ... to change my gnome-terminal's title. Turns out I already had a PROMPT_COMMAND set to echo the last command into the title which was overwriting my changes.
We use a combination of tmux and mumble to get multiple remote-working coders all looking at one screen. It's very useful, even if we sometimes type over each other. It's also great when somebody has to give a demo but only the guy 3 states away can really get things configured properly--just fire up a shared tmux session!
tmux is like that thing that you hear about quite often, that you think it's not that useful, but that, once you try, you realize why and where its fame comes from.
I adopted tmux about a month ago and I can't really complain much. It's just awesome. If you work a lot in the terminal (I do), I would highly recommend using it.
I use screen quite a lot -- and with xmonad as my main wm, I really don't need many features from screen -- I just have one screen per terminal window.
A friend of mine uses OS X -- and there tmux comes more to it's right as there's no (Free) way to get sane (for biased values of sane) window management under OS X.
[edit: It might be worth noting, that after running into a lot of problems with unicode input and urxvt, I switched to sakura[1] for my terminal -- and it's basically a lighter gnome terminal that's easy to set up without any chrome. Under debian I bind that to my x-terminal-emulator alternative, and I can ctrl-enter to open a new terminal via xmonad (xmonad needs a short config to use x-terminal-emulator though).
Well, if you use screen and it works for you, then it might be a good idea to keep using it. Why change something if it works? :D. Both tmux and screen are similar. By the way, that's the config I personally use and it works pretty well: https://github.com/tony/tmux-config.git.
I'm using the netrc account field as an identifier on which I filter account info in the lambda function. More info about fields are here http://linux.die.net/man/5/netrc
I've been using screen for years. It works well for me. Can someone list some reasons to switch to tmux? Just about the only thing which annoys me in screen is the awkward switch to "copy mode" to scroll, instead of just hitting PgUp.
no patching for vertical and horizontal splits (I know screen doesn't do one of them without a fair bit of work).
tmux isn't a dead project.
Spirit of exploration? I started with tmux and no screen experience, but I've converted a few people to tmux by them just giving it a chance, basically.
Thanks for sharing! I was introduced to Tmux at work earlier this year. We used it primarily for remote pairing, but now I use it for anything and everything terminal.
At work I use Windows->Putty->Linux->tmux, at home I use Linux->urxvt->ssh->Linux->tmux and Linux->uxrvt->tmux. When working on a Linux machine directly, I also use a tiling window manager.
Do you mean as opposed to people who use screen, or as opposed to people who somehow do without either? Since tmux was invented in the OpenBSD world, I expect it's still mostly Unix users.
For me yes, Win7 + MobaXterm which totally rocks, so much so I paid for it. Worth the punt just for the X support i.e. PyCharm running on remote server with UI on my Win7 desktop.
>But the years of using screen have ingrained in my muscle memory to use ctrl-a
I still don't understand how this happened to so many people. Ctrl+a is already taken, how did anyone ever use screen without immediately changing it to something that doesn't conflict with a frequently used shell shortcut?
Most people I know use it to go to the beginning of a line in programs that use readline, which includes the shell as well as most programming language interpreters.
You can set readline's editing mode to vi so that anything that uses readline will then have vi-style bindings. Very useful, particularly when combined with rlwrap for those few programs that don't have readline support.
Zsh doesn't use readline (it has it's own line editor) but it can be set to vi-style input too. (Actually, at least on my system, bash doesn't seem to be linked with libreadline.. I'm not sure if it is actually using readline or not)
It looks like bash does use readline, though it's not dynamically linked with it (at least on my system). Kind of seems like bash and readline are intertwined more than I thought; the git repo for bash has a distribution of readline included in it.
That makes sense to me. The shell is fundamental to the system, and is so heavily intertwined with readline that it is very sensitive to ABI/API changes. Consider: if you upgrade your readline without upgrading bash, or vice versa, you lose the ability to fix the problem even in single user mode. Having Bash control its own readline usage seems like the safest option, though conceptually a bit more complex.
I started using screen before I started learning that facility. (At the time, I mostly used Windows, so the Home key was available.)
Of course, when I started developing on a Macbook, screen rapidly became problematic as there was no Home key and I started using Ctrl-A. For the moment, I'm developing locally so I don't need screen or tmux, but I'm working on off-loading to a VM and I'll be using tmux there for the purposes of maintaining my own sanity.
I'd always used Ctrl-a in screen because it was the default. When I moved to tmux I just moved it there, but tmux lets me send the Ctrl-a key sequence through to those apps.
So if I want to go to the beginning of a line in Bash, I just press C-a C-a (which actually works if I hold down Ctrl and press 'a' twice.
Not a big deal at all, and since I remap Caps Lock to Ctrl, the command combo is right on my left hand. (I slide my hand over a bit as if I were playing guitar or piano, rather than stretch fingers, so pinky on CapsLock, ring finger on a.)
I've been doing the same for a while, despite the fact that C-\ is in fact sort of already "taken" by default (SIGQUIT). That's not something I use often, but when I want it it's still easy enough to get by just sending C-\ twice. The only downside is occasionally (whether by accidental double-triggering or hitting C-\ out of habit when not actually running screen) killing foreground processes by mistake.
You should, ctrl-\ is the best process killer. No way to escape from xtail without it, for instance. And sometime it will help getting out of python scripts like nosetests.
I use the Windows Menu key (the Windows key to the right of the spacebar) for that. Except I use yeahconsole, which is the same concept without the Gnome dependencies.
Such a handy feature, isn't it. I would be lost without my drop-down console.
Because ctrl-a is extremely simple, physically ... for one hand, etc.
ctrl-b is fairly quick and easy if you use two hands (which is inferior to using one hand) and is quite a bit more difficult than ctrl-a when using one hand.
That has nothing to do with the subject of the post in question though. He asked how people ever got accustomed to ctrl+a in the first place, since ctrl+a is already taken by your shell and every readline app, so 90% of people immediately remapped screen to use something else instead of ctrl+a. Tmux and ctrl+b don't enter into the discussion at all.
Yes I do sort of this, only I use CTRL+Z instead, works sweet:
# C-z as prefix key. C-z C-z will send C-z to application, C-z z cycles last window
set-option -g prefix C-z
unbind C-b
bind-key C-z send-prefix
bind-key z last-window
I use screen/tmux control combos far more frequently than I've used ctrl-a for beginning of line. That's what the home key is for (cue thousands of vim users telling me I shouldn't use any key that wasn't on a keyboard 40 years ago).
Control-A / Control-E is by far the most uniform start of line/end of line keyboard shortcut in OS X, and moreover I can use it without taking my hands off home row.
I use backtick. It's great not having to reach for a control or alt key to change window.
It is a minor annoyance in markdown but in shell programming I use `$(...)` instead, since it can be hard to tell if a character is a backtick or a single quote.
Agreed completely. I used Ctrl-] with screen and just kept that convention with tmux. Ctrl-a is a non-starter for Emacs users, and even neglecting that, there are many contexts where Ctrl-a/Ctrl-e navigation is enabled and useful.
Serious question, what does tmux have to offer emacs users? I used and loved tmux back when vim was my editor, but after switching to emacs (thanks evil-mode), I stopped using it because emacs seems to cover all the bases on its own.
For the same reason (I'm using Ctrl+a in the shell), I'm using Ctrl+q as prefix for tmux. I'm quite surprised that I've never heard of anybody else using this combination.
It's got the whole thing covered end-to-end if you ever wanted to get around learning it.