Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

PositiveControl commented Jun 6, 2014

Thanks a lot!

@pfriedland
Copy link

pfriedland commented Jun 11, 2014

Thanks!

@piyushkandpal
Copy link

piyushkandpal commented Jul 21, 2014

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

ccmcbeck commented Feb 19, 2015

The gist that keeps on giving...

@fifty-six
Copy link

fifty-six commented Apr 16, 2015

Thanks for the great mouse support 😃

@kirkelifson
Copy link

kirkelifson commented Apr 16, 2015

Thanks!

@vtombesi
Copy link

vtombesi commented May 14, 2015

Thank you

@vamshisuram
Copy link

vamshisuram commented May 24, 2015

Infinite thanks..

@gaoxiang007
Copy link

gaoxiang007 commented Jun 23, 2015

Thanks :)

@alexserver
Copy link

alexserver commented Nov 19, 2015

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

hprobotic commented Aug 17, 2016

Nice, thanks

@wilgoszpl
Copy link

wilgoszpl commented Sep 20, 2016

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

athrunsun commented Jan 5, 2017

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

lucduong commented Apr 24, 2017

Thank you ✌️

@Chan-Chun
Copy link

Chan-Chun commented May 10, 2017

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

bambusdani commented Nov 23, 2018

Thanks

@stalinstepin
Copy link

stalinstepin commented Feb 24, 2019

@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

stalinstepin commented Feb 24, 2019

@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

Parkboyoung11 commented May 1, 2021

thank u

@chicken-space-invader
Copy link

chicken-space-invader commented Nov 5, 2021

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