16 ms·
Tmux 2.0 released
- ceronman 11y agoI recently discovered Tmux after years of using GNU Screen. I love it. It feels much easier to use and more intuitive, easier to script. Also integration with terminal emulators such as iTerm2 on OS X or Byobu on Linux is fantastic. Tmux earned a place in my list of favorite daily used tools.
- dorfsmay 11y agoThe biggest advantage of tmux over screen is its ability to automatically resize based on the smaller terminal connected to it. I know there are a lot other advantages, but this in itself was a game changer for me.
- postila 11y agoWhy it's 2.0? I don't see any really significant changes, or maybe I missed smth.
- andyl 11y agoMaybe because Tmux 2.0 has some breaking changes??
- deleted 11y ago[deleted]
- postila 11y agolike what?
- untothebreach 11y agoIncompatible Changes ==================== * The choose-list command has been removed. * 'terminal-overrides' is now a server option, not a session option. * 'message-limit' is now a server option, not a session option. * 'monitor-content' option has been removed. * 'pane_start_path' option has been removed. * The "info" mechanism which used to (for some commands) provide feedback has been removed, and like other commands, they now produce nothing on success.
- raimue 11y agoThey broke features between releases before without increasing the major version number. While trying to use the same .tmux.conf over multiple versions of tmux 1.x, I often had to adapt the config file to settings being renamed or just going away without a deprecation warning beforehand.
- elwin 11y agotmux is an OpenBSD-influenced project. Those projects' version numbers often progress from N.9 to N+1.0 without having any special significance.
- stormbrew 11y agoThe main thing that I wish I could have in tmux is the ability to disable other sessions attached to the current terminal without outright detaching them. I intend to go back to that other machine at some point, I just don't want its tiny screen making my current session tiny for no reason. Maybe this is actually possible already and I just haven't found it?
- jbnicolai 11y agoSay you want to attach to session 0 (use `tmux list-sessions` to see available sessions). A trick I've found is not attaching to that session, but starting a new session sharing all underlying windows. The model in tmux is [session]->[windows]->[panes], but something I did not realize until recently is that [session] can be multiple. So rather than `tmux attach -t 0` use `tmux new-session -t 0`, allowing you to interact with the same windows without disturbing the other session.
- pavel_lishin 11y agoIs this a feature in 2.0? It doesn't seem to work for me - I still see a large part of my terminal window filled with the dots, since the other session's terminal window is much smaller.
- jbnicolai 11y agoAh, I forgot to mention: the resize -if the terminal-window is smaller- will still happen, but as long as the two sessions are operating on a different window they can be of different size.
- pavel_lishin 11y agoI think I'm missing something. Terminal A: 300x10 lines (long across, but short) Terminal B: 120x30 lines (standard new terminal size) I have a tmux session running in A; I open terminal B, and attach to it with -new-session. My first pane is trimmed to the height of Terminal A. If I do prefix-c (create new pane), the new pane is now the size of Terminal B - hurray! But if I open Terminal C, which is yet another size, and attach to my existing session, it resizes every pane in Terminal B to the size of Terminal C; and when I disconnect from Terminal C, those panes do not appear to switch back to what they now should be, unconstrained by Terminal C. (If I didn't explain this clearly, I can provide some screenshots later.)
- bluehex 11y agoIt makes me sad to see a respectable piece of open source software hosted on this site with its intrusive advertising practices such as ads with fake "install" buttons on the download page. What is the advantage of using Sourceforge these days when github and bitbucket are free for open source?
- res0nat0r 11y agoAll I see after clicking download is a direct link to the file, which is in fact just a .tar.gz.
- jbnicolai 11y agoAre you sure you don't have any ad blocker installed?
- vampirechicken 11y agoA reasonable followup question why wouldn't one have an ad blocker installed?
- sp332 11y agoThe original question was, why use a host that tries to show you ads in the first place?
- GrantSolar 11y agoBecause it's how 99% of websites get their funding, allowing them to survive. Why have an adblocker installed when you can avoid the sites with obnoxious adverts?
- jkyle 11y agoSometimes I have to get useful tools from them....like tmux. As to why I use Adblock, I've never. Not once. Ever. Bought anything from an ad on a website. I _have_ bought books and such from the referral links on blogs (which adblock doesn't block). The reason I use adblock is because I'm not the demographic ads on websites are targeting. So websites aren't losing any revenue by me not seeing their ads.
- andyl 11y agoI'm looking forward to the combination of Tmux and Neovim. Both (will) support detached/shared sessions, both are scriptable/configurable, both can be driven by a remote process. I believe with Tmux and Neovim you could put together anything from a simple test/editing environment to a full-blown IDE.
- vampirechicken 11y agoBut you can already script vim...
- catern 11y agoWell, no need to really look forward... You already have every one of those capabilities with Emacs. >you could put together anything from a simple test/editing environment to a full-blown IDE. People already do this with Emacs.
- andyl 11y agoEmacs is great and I know lots of people who love evil mode. I prefer vim because it comes pre-installed - good for ops. Many of my tools have embedded Lua, so it's great that I can exercise my Lua skills with Neovim. None of my other tools embeds elisp, so for me, elisp is a dead-end.
- catern 11y agoNeovim won't be preinstalled for a long time. Possibly it never will be. Also, writing Elisp is not far from writing Guile Scheme, and there are many tools that embed Guile.
- jbnicolai 11y agoFor those who are just getting started with tmux: I advise looking around others' .tmux.conf files for some sensible settings. Like Vim, Tmux ships with a lot of powerful features disabled by default. My absolute favorite has to be binding a hotkey to opening URLs in the current window [0]. See [1] for a small demo I just recorded. To get started, here's my current config: [1] [0]: https://github.com/jbnicolai/tmux/blob/master/.tmux.conf#L129 https://github.com/jbnicolai/tmux/blob/master/.tmux.conf#L12... [1]: http://recordit.co/vdxy09GpYG http://recordit.co/vdxy09GpYG [2]: https://github.com/jbnicolai/tmux/blob/master/.tmux.conf https://github.com/jbnicolai/tmux/blob/master/.tmux.conf
- Jaepa 11y agoYou use ctl+s as your bind?
- jbnicolai 11y agoI do. It's closer to the prefix/leader I was used to when using screen (<C-a>), and I find it easier to type.
- JoshTriplett 11y agoWhy not use C-a?
- GrandTheftR 11y agoI assume ctrl-s is easier to press than ctrl-a, I have trouble with ctrl-a on Mac with reconfigured CapsLock, and my bind key is ctrl-space.
- Lio 11y agoThat's why I remap the right alt key on mac (laptops) to ctrl. Having left right balanced ctrl keys is much more important for my workflow.
- 11y ago
- tomswartz07 11y agoThe release notes don't say: Is this a session-breaking update? I'd hate to run the update only to have it kill my current TMUX session. Devs - if you're reading this: PLEASE indicate if I could update without restarting the session.
- sikhnerd 11y agoDoes not appear to be a session-breaking update. I just updated with no ill effects.
- albemuth 11y agohave you tried something like tmuxinator so create/restore sessions?
- zserge 11y agoMay I suggest a more lightweight alternative for Tmux/Screen/DVTM sessions - http://zserge.com/blog/mucks2.html http://zserge.com/blog/mucks2.html ?
- thomasadam 11y agoActually, I already provide this in the release notes. A PROTOCOL_VERSION bump means restarting tmux. We didn't do this between 1.9a -> 2.0, hence why it wasn't mentioned. Look at the release notes for 1.9, you'll see it was mentioned there. Simples.
- funksta 11y agoI don't see anything about it, so I'm assuming there's still no support for "true" (24 bit) colour? Would really love if they added that, since Neovim now supports it.
- byaruhaf 11y agoI'm excited by the improvements in the pane navigation. I'd have to try it out to get the feel of it but looks like an improvement.
- agumonkey 11y agoI use tmux all the time, but I've read about dtach/dvtm. http://www.brain-dump.org/projects/dvtm/#why http://www.brain-dump.org/projects/dvtm/#why Anyone using that instead ?
- chriswarbo 11y agoI'm using dvtm, after trying screen and tmux in the past. No particular reason other than it's Xmonad-like layout switching. It's crashed once, in a few months of usage. Make of that what you will.
- chriswarbo 11y agoHmm, make that twice. Maybe I'll go back to tmux ;)
- micampe 11y agoI use dtach because detaching from the terminal is the only feature I would use in tmux.
- agumonkey 11y agoThat was one argument I saw on an article, dvtm carries a simpler self-sufficient task and is far smaller than tmux. Separation of concerns etc.
- farva 11y agoHave a look at abduco as well. It's a (IMHO) more user-friendly (and supposedly cleaner) dtach replacement, from the author of dvtm.
- possibilistic 11y agoDoes anyone else wish tmux were modal like vim, ie. without a "leader" key? My conf file has a ton of custom key bindings for window / pane management, and I'd love for them to go away or become simplified by simply dropping into a "window management mode". Likewise, I'd like the command mode to stay open until I close it. I have some scripted hacks to do this, but it's nowhere near what I'd expect from true modality. One of these days I guess I could get around to writing a patch. This single feature is probably my most wanted for any software at the moment.
- jbnicolai 11y agoOdd. I'd consider myself a 'power user', but I hardly ever find I have that need. Could you describe what you do when you're entering several command-mode lines in succession?
- geoka9 11y agoMaybe because I'm an emacs user, I find it pretty intuitive. As a ratpoison/conkeror/emacs/tmux user I often find myself juggling at least 4 sets of prefix keys. It works surprisingly well, I just made sure they are in different places on the keyboard, so that I don't mix them up.
- Cushman 11y agoYes! Probably my biggest workflow pipe dream since getting some fluency in vim is to be able to drop into an "outside mode". I've cobbled something vaguely modal together for bspwm with abuse of shkd, so a lot of the binds map similarly, but like your solution it's far from ideal. As for "Why would you want this?" For me, the straightforward answer is "modes are modular". A core concept in vim is that your input can be thought of as a string describing the edit you wish to make, and modes help me keep that manageable in my head: I can first think about the mode I plan to enter, and then separately what I plan to do under the constraints of that mode. It's a little hard to explain, and I'm sure acolytes of other paradigms have their own philosophies, but it fits in really well to my workflow. It's a subtle thing in the limited world of text editing, but I definitely miss the semantics whenever I leave it, whether to a terminal or a browser or whatever. So for me, it comes down to wanting to bring the cost of task switching closer to what it is in the editor.
- floatboth 11y agoStill no true color support :-(
- geoffharcourt 11y agoIt looks like the true color ticket on tmux was closed out: http://sourceforge.net/p/tmux/tickets/140/ http://sourceforge.net/p/tmux/tickets/140/ I was applying this patch to 1.9 on my machine and it worked well: https://gist.github.com/JohnMorales/0579990993f6dec19e83 https://gist.github.com/JohnMorales/0579990993f6dec19e83 Haven't had a chance to see if the same diff can be applied to 2.0 yet.
- funksta 11y agoI tried the same patch on 1.9a but couldn't get it to work (tmux built fine but no dice with 24 bit colours). Very curious to hear if it works with 2.0.
- nicm 11y agoa couple of people have asked me about how true colour should look but none have sent code so far, it's not a very interesting feature to me so it'll need someone who cares about it to do it
- xucheng 11y agoThis is still failing: bind-key -t vi-copy Y copy-end-of-line \; run-shell "reattach-to-user-namespace -l zsh -c 'tmux save-buffer - | pbcopy'"
- andrewstuart2 11y agoHoly moley, I knew there were 24 function keys at one point, but 63? That's crazy! I love learning little things like that. I'm definitely glad modifier+key shortcuts are so common. I like it when shortcuts can be somewhat mnemonic (and I love vim).
- zatkin 11y ago>CHANGES FROM 1.9a to 2.0 6 March 2015 I think they meant 6 May 2015?
- nickysielicki 11y agoWhy should I use tmux over screen? Why do I use screen over tmux?: - its old. A stable version is on every distro. Trying to start a screen session is more likely to succeed on any given box than a tmux session. I see my friends wrestle with their tmux setup being more recent on one box than another and their nested sessions get screwed up. I never have any issue. - I know it, and for my simple use it does everything perfectly. I can split panes, I can detach and come back, I can nest sessions. - screen can attach to serial terminals. What's the killer feature of tmux that I'm missing out on?
- evol262 11y agoIt's maintainable, modern code, which screen is not. Screen is not dead yet, but it eventually will be.
- Peaker 11y agoHe didn't ask which one is nicer to hack on.
- ChristianBundy 11y agoNo, they asked "Why should I use tmux over screen?", which the answer was relevant to.
- Peaker 11y agoDoesn't seem that way to me at all.
- exDM69 11y agoNot sure if it works in GNU Screen but tmux can be controlled from the command line. Examples: tmux show-buffer | vipe | bash - tmux send-keys -t debugger run This allows nice ad hoc scripts that are composable in a very Unix-y way.
- perlgeek 11y agoI use both, and enjoy that they have different control keys by default, so I can nest them painlessly without need for any configuration. Also, tmux works out-of-the-box for accounts that you su'ed into, something I never managed with screen.
- ethagnawl 11y agoDoes anyone have Tmux 2.0 working alongside Tmuxinator? I know the project only claims support for 1.8, but I've been using it alongside 1.9 (mostly without issue) for many months.
- cm3 11y agoDoes tmux still have no flow control? Just compare how tmux locks up when you `tar xfv linux-4.0.tar.xz` and screen doesn't. None of the knobs to control output throttling helped. How do you get around this problem?
- chirayuk 11y agoI run `stty -ixon -ixoff` once and that fixes the issue for me.
- cm3 11y agoThat's a different flow control than what I'm talking about. tmux is just overwhelmed and cannot keep up with the output from tar whereas screen takes care of it and still responds to user input. Frankly I'm amazed there's only one or two posts about this on the internet as there's more than the pathological linux tarball extract where this problem will lock up tmux.
- nicm 11y agoyes, this sucks but i have never myself been able to find a reliable case where screen reacts any better than tmux (for example, both behave similarly with yes(1)) the c0-* stuff is poor (i'm tempted to remove it) but it is not an easy problem to solve, people want tmux to be fast, except when they don't. it's also tricky remotely where ssh and the network stack are buffering too
- cm3 11y agoI wish it was possible to have screen-like bindings that don't require explicitly defining them all so that you don't have to unpress Ctrl each time. In screen you can press C-a c quickly but for that to work in tmux you have to add this: bind-key C-c new-window
- MikeKusold 11y agoIs line 2 what you are looking for? https://github.com/kusold/dotfiles/blob/master/tmux.conf#L2 https://github.com/kusold/dotfiles/blob/master/tmux.conf#L2 I just tried it out, and `C-a c` created a new windows for me.
- cm3 11y agoTried that before and with 2.0 but it doesn't work. You still have to release both 'Ctrl' and 'a' before pressing 'c'. In screen you don't have to and chaining works comfortably.
- scottjad 11y ago> In screen you can press C-a c quickly Screen just binds C-a c and C-a C-c to the same command, for some values of c.
- morenoh149 11y agobrew install tmux to install on osx. If you already had tmux brew unlink tmux; brew install tmux
- wyclif 11y agoYes, without unlinking, some people are probably going to experience this effect: >brew install tmux Warning: tmux-1.9a already installed Then again: >brew unlink tmux Unlinking /usr/local/Cellar/tmux/1.9a... 4 symlinks removed >brew install tmux Warning: tmux-1.9a already installed, it's just not linked
- luxpir 11y agoAnyone else slightly disappointed that connecting to a tmux session with mosh breaks mouse-mode? That fixed, plus session restore, would be the dream.
- nicm 11y agoi suspect you need to talk to the mosh guys for this
- luxpir 11y agoTrue enough. The session restore still stands. I know tmuxinator exists, but as a personal preference I'd prefer it in-built/native. Also to save state, which I'd expect is asking too much.
- nicm 11y agowhat do you mean session restore? we could restore the basic layout of sessions, windows, panes but we couldn't restore what was run in them (and it would be dangerous to try)
- creack 11y agoThis new release breaks emacs' cursor with iTerm2 :(. Works fine with tmux + Terminal or iTerm2 without tmux though.
- pan69 11y agoI've only recently discovered tmux (feels ashamed). It's fantastic. The only thing I miss is just a sprinkle of mouse interaction. Moving around with the keys is easy enough of course but if you have a terminal in an otherwise desktop environment, it would be really nice to just be able to "click" in a pane to focus it.
- skeuomorf 11y agoIf you really want this, you should use a tiling window manager and use "focus follows cursor" or "focus on click".
- alaskamiller 11y agoLearned Tmux a few weeks ago and use it every day now. You can enable Mouse Mode, on Macs you can install extra Tmux features, and iTerm2 has mouse mode built in.
- thristian 11y agoPut "mouse-select-pane on" in .tmux.conf. If you check the tmux manpage and search for 'mouse', there's a whole bunch of mouse-enabling options; you might as well turn them all on -- except for "mouse-utf8", which is a compatibility option that can potentially screw things up. The downside to enabling mouse support in tmux is that it disables mouse support in the outer terminal (the one tmux is running inside). If you select text in tmux, it will go to the tmux clipboard instead of your system clipboard. You can get around that by holding shift before selecting text, but some people get annoyed by the extra action required.
- _cudgel 11y agoTry these options: set-option -g mode-mouse on set-option -g mouse-resize-pane on set-option -g mouse-select-pane on set-option -g mouse-select-window on
- vhost- 11y agoThis is great news! But I've started to use Tmux less after being REALLY into it. I've slowly replaced it with a tiling window manager because I've noticed my ncurses and curses programs don't draw right in Tmux. I've found a couple work arounds, like using the TERM env var, but it doesn't work for everything. I'm wondering how others have solved this problem, if they have at all.
- greggyb 11y agoI run into the opposite. St doesn't play well with n/curses in my experience (mostly corrupt characters on display), and the easiest solution I've seen is to run these programs in a Tmux session. I use Tmux all the time anyway, so this doesn't add any extra overhead for me (mental or system).
- coned88 11y agoI really want tmux or screen to just scroll when I mouse wheel up or press the up arrow on the selected window. I don't like having togo into copy mode.
- smileart 11y agoWhat's wrong with `setw -g mode-mouse on`? Or I simply didn't understand the point.
- deleted 11y ago[deleted]
- freedevbootcamp 11y agoCongrats to the Tmux team for a great open source tool. Its sad that HN decided to take this moment to talk about sourceforge and not the product announcement.
- wldcordeiro 11y agoIt's a tool I use daily, I love Tmux!
- bluehex 11y agoYes, I'm also a huge fan! I'm sorry for the derailment. I probably should have put it in a separate post.