Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple tabs with tmux / tmuxinator and iTerm2

I would like to open all my useful stuff like here in iTerm2:

iTerm2 without tmux

Not like this:

iTerm2 with tmux

I'm using tmuxinator I've defined some tabs. I wonder if it's possible to get the former behaviour at all.

like image 257
Tomek Wałkuski Avatar asked Dec 07 '12 15:12

Tomek Wałkuski


People also ask

Does iTerm2 use tmux?

iTerm2 is a very capable terminal application for MacOS. One of its best but probably least-used features is its native integration with tmux. Tmux is a terminal multiplexer. Simply put, this allows you to split one terminal session into many.

How do I enable tmux on iTerm2?

Start new tmux session using -CC option Using iTerm 2, log into the machine you want to work with. This can be your local machine or a remote server over ssh. Start a new tmux session using the -CC option. You will see a message saying tmux mode started with a Command Menu.

What is Tmuxinator?

tmuxinator is a ruby gem that allows you to easily manage tmux sessions by using yaml files to describe the layout of a tmux session, and open up that session with a single command.


1 Answers

I just tried with tmux 1.8. Not totally obvious, but it works.

Here's what you do:

  1. Open iTerm2 (latest, be sure to have at least tmux 1.8 installed).
  2. In iTerm2, run command tmux <your tmuxinator profile>. Then detach ^b d.
  3. In iTerm2, run command tmux -CC attach -t <your session>. You will see your tabs open in different windows.
  4. Open menu Shell->Tmux->Dashboard
  5. Select and hide all the windows.
  6. Select all the hidden windows, and click Open in Tabs.

I'd like to know how to avoid the part about hiding and opening in tabs.

like image 157
justingordon Avatar answered Oct 06 '22 02:10

justingordon