dotfiles/.tmux.conf
Andrew Tomaka 9588918a71 Account for different tmux versions
tmux 1.9 implemented a behavior breaking change.  When splitting or creating new
panes or windows, the current path is no longer kept.  This is addressed by the
addition of the -c parameter to the new-window and split-window commands.
Unfortunately, 1.8 does not support the -c parameter.
2015-03-17 17:21:22 -04:00

64 lines
1.7 KiB
Bash

# for setting up
bind-key r source-file ~/.tmux.conf; display-message " ✱ ~/.tmux.conf is reloaded"
# ctrl-b is annoying
set-option -g prefix C-a
# double tap for back and forth
bind-key C-a last-window
# for muxception
bind-key a send-prefix
# close window
bind q confirm kill-window
# 0 is way over there
set-option -g base-index 1
setw -g pane-base-index 1
# 256 colors (bce matches whatever I am doing with t_Co=256 in vim)
set -g default-terminal "screen-256color"
# hostry should be longer
set -g history-limit 10000
# no autorename
set -g automatic-rename off
# renumber windows
set -g renumber-windows on
# activity stuff
set-window-option -g monitor-activity off
# copy mode stuff
set-window-option -g mode-mouse on # mouse can enable (danger zone, maybe?)
set-window-option -g mode-keys vi # emulate vim movement in copy mode
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind y run-shell "tmux show-buffer | xclip -sel clip -i"
# be more like vim
bind h select-pane -L # left pane
bind j select-pane -D # bottom pane
bind k select-pane -U # top pane
bind l select-pane -R # right pane
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
# status bar stuff
set -g status on
set -g status-bg colour236
set -g status-fg white
set -g status-left '#[fg=green]#H'
set-window-option -g window-status-current-bg white
set-window-option -g window-status-current-fg black
set-option -g status-right '%d %b %Y @ %k:%M'
# because the new tmux is inadequate
if-shell 'test "$(tmux -V) = "tmux 1.8"' "source-file ~/.tmux.1-8.conf"
if-shell 'test "$(tmux -V) = "tmux 1.9"' "source-file ~/.tmux.1-9.conf"