Skip to content

Instantly share code, notes, and snippets.

@simme
Created October 19, 2011 07:55
Star You must be signed in to star a gist
Save simme/1297707 to your computer and use it in GitHub Desktop.
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
# Enable mouse support in ~/.tmux.conf
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-window-option -g mode-mouse on
# Install Teamocil to pre define workspaces
https://github.com/remiprev/teamocil
# See http://files.floriancrouzat.net/dotfiles/.tmux.conf for configuration examples
@PositiveControl
Copy link

Thanks a lot!

@pfriedland
Copy link

Thanks!

@piyushkandpal
Copy link

Great man .. worked like magic ...thanks so much :) :)

@m9dfukc
Copy link

m9dfukc commented Sep 30, 2014

Perfect ... thanks so much!!!

@linse
Copy link

linse commented Oct 2, 2014

Thank you, this is so useful!

@ccmcbeck
Copy link

The gist that keeps on giving...

@fifty-six
Copy link

Thanks for the great mouse support 😃

@kirkelifson
Copy link

Thanks!

@vtombesi
Copy link

Thank you

@vamshisuram
Copy link

Infinite thanks..

@gaoxiang007
Copy link

Thanks :)

@alexserver
Copy link

I got this error when I start tmux after adding those lines to .tmux.conf

.tmux.conf:1: unknown option: mode-mouse
.tmux.conf:2: unknown option: mouse-select-pane
.tmux.conf:3: unknown option: mouse-select-window

@tmclnk
Copy link

tmclnk commented Nov 26, 2015

If you're getting the errors like alexserver mentioned above.

.tmux.conf:1: unknown option: mode-mouse
.tmux.conf:2: unknown option: mouse-select-pane
.tmux.conf:3: unknown option: mouse-select-window

Check your version tmux -V. If it's >=2.1, syntax was simplified to:

# Mouse mode for tmux > 2.1 (Oct 2015)
set -g mouse on

http://stackoverflow.com/questions/30185210/ubuntu-change-tmux-1-8-to-tmux-next-1-9 for details.

@flov
Copy link

flov commented Dec 1, 2015

This doesn't work in the newest tmux 2.1, check out tmux/tmux#145
after set -g mouse on do this:
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
tmux/tmux#145

@corv89
Copy link

corv89 commented Dec 3, 2015

@flov amazingly that incantation worked. thanks!

@hprobotic
Copy link

Nice, thanks

@wilgoszpl
Copy link

set -g mouse on

Works fine, but there is no way to copy text using mouse then. Do you guys have any solution on that?

@milansk
Copy link

milansk commented Nov 9, 2016

@wilgoszpl Hold down Option key while selecting the text.

@athrunsun
Copy link

Is there a binary version of tmux? I don't like to install a lot of dependencies...

@tony
Copy link

tony commented Feb 9, 2017

I released The Tao of tmux, a book on tmux on leanpub on amazon a few weeks ago. You can read the full book online for free at https://leanpub.com/the-tao-of-tmux/read.

@lucduong
Copy link

Thank you ✌️

@Chan-Chun
Copy link

thank you !

@pezzati
Copy link

pezzati commented Jun 12, 2017

nice and easy, very useful for training process of our team :))

@csmrkid
Copy link

csmrkid commented Jul 13, 2017

Great work , love it

@haythamdouaihy
Copy link

haythamdouaihy commented Apr 16, 2018

great thanks!
for the mouse support:
set -g mouse on

@bambusdani
Copy link

Thanks

@stalinstepin
Copy link

@agfor It is not necessary. But I find it helps alot! It let's you define project setups, with panes and windows, in a YAML-file. And then just run a command to setup any number of windows and panes running a command. I do all my dev in the terminal, so for each project I have a YAML file that launches vim in one pane, starts SASS-compilation in another, etc etc. So I do not have to manually setup panes everytime I'm developing on a specific project.

Is there a small demo that you can show on how you use Teamocil?

@stalinstepin
Copy link

@agfor It is not necessary. But I find it helps alot! It let's you define project setups, with panes and windows, in a YAML-file. And then just run a command to setup any number of windows and panes running a command. I do all my dev in the terminal, so for each project I have a YAML file that launches vim in one pane, starts SASS-compilation in another, etc etc. So I do not have to manually setup panes everytime I'm developing on a specific project.

Is there a small demo that you can show on how you use Teamocil?

I guess, I have the details regarding Teamocil from - www.teamocil.com. Will test it out and will revert if any hiccups. Cheers!!

@Parkboyoung11
Copy link

thank u

@chicken-space-invader
Copy link

Doesn't work any more. Using set -g mouse on instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment