17

I've installed tmux 2.0 from homebrew on OSX 10.10.5 By default it does not create a config, but I've researched that there should be ~/.tmux.conf file so I've created it myself I'm using iTerm2.

The problem is that whatever I add to this config file - it doesn't affect tmux. So after restarting tmux I see no changes…

I want my tmux to have large scrollback buffer:

set -g history-limit 65000

No result((

I want to install this awesome tmux-powerline but after folowing the instructions preciesly I see no changes - just standard tmux line instead of that nice customized one(( I've tried even powerline project and it works with Vim and prompt line, but totally ignores my Tmux line…

my ~/.tmux.conf:

### enable mouse: ###
set -g mode-mouse on

### Scrollback buffer ###
set -g history-limit 65000

### Powerline path: ###
#source /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf

### 256 colour support
#set -g default-terminal "xterm"
set -g default-terminal "screen-256color"

### TMUX-Powerline ###
set-option -g status on
set-option -g status-interval 2
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/scripts/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/scripts/tmux-powerline/powerline.sh right)"

set-window-option -g window-status-current-format "#[fg=colour235, bg=colour27]⮀#[fg=colour255, bg=colour27] #I ⮁ #W #[fg=colour27, bg=colour235]⮀"

Please help me to determine what's the problem with my tmux or it's config file. Thank you

3 Answers 3

16

For some reason tmux didn't reload the ~/.tmux.conf when doing just exit and tmux again. So I addressed this issue with sudo kill $(pidof tmux). After starting new tmux session all worked properly

0
9

You can reload your config with tmux command:

:source-file ~/.tmux.conf

To access tmux command line type Ctrl + b (or whatever your prefix is) followed by : .

More details could be found here.

1

tmux seems to ignore configuration in .tmux.conf below the line which results in error. In my case it was powerline setup line breaking and no later config was applied. Python 2.7 is not present in newer versions of OSX so I had to install powerline using Python3 like below (notice I'm using pip3 not pip):

brew install python
pip3 install powerline-status

The first command above installed Python 3.10 for me. I already had Python 3.9 so I don't think the first line is needed.

This installed powerline bindings under /Users/{replace_your_user_name}/Library/Python/3.10/lib/python/site-packages/powerline/bindings/

In .tmux.conf I added this line:

source '/Users/{replace_your_user_name}/Library/Python/3.10/lib/python/site-packages/powerline/bindings/tmux/powerline.conf'

This didn't work until I added folder containing powerline-config to the PATH. All worked after I added this to my .zshrc

export PATH=$PATH:/Users/{replace_your_user_name}/Library/Python/3.10/bin

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .