|
|
@@ -1,3 +1,5 @@
|
|
|
+# vim: ft=tmux
|
|
|
+
|
|
|
# Use `Ctrl-A` as the tmux command prefix instead of `Ctrl-B`.
|
|
|
unbind-key C-b
|
|
|
set-option -g prefix C-a
|
|
|
@@ -22,15 +24,6 @@ set-option -g visual-activity on
|
|
|
# current window, rather than the smallest session to which it is attached.
|
|
|
set-window-option -g aggressive-resize on
|
|
|
|
|
|
-# Mouse Support! (for scrollback, and lazy manipulation of windows/panes)
|
|
|
-# At least with iTerm2, this plays very well with vim mouse support :D Yay!
|
|
|
-# Note: text-selection by default does a tmux copy (paste with prefix+]).
|
|
|
-# Hold alt/meta/option for system selection/copy.
|
|
|
-set-option -g mode-mouse on
|
|
|
-set-option -g mouse-select-pane
|
|
|
-set-option -g mouse-resize-pane on
|
|
|
-set-option -g mouse-select-window on
|
|
|
-
|
|
|
# Act like vim.
|
|
|
set-option -g status-keys vi
|
|
|
set-window-option -g mode-keys vi # vi keys in copy mode (prefix+[)
|
|
|
@@ -94,5 +87,9 @@ bind-key C-s choose-session
|
|
|
bind-key X kill-session
|
|
|
# Remember prefix+$ for renaming sessions.
|
|
|
|
|
|
+# Version-specific configuration.
|
|
|
+if-shell '[[ `tmux -V | sed "s/[tmux |\.]//g"` < 21 ]]' 'source-file ~/dotfiles/tmux/tmux1.conf'
|
|
|
+if-shell '[[ `tmux -V | sed "s/[tmux |\.]//g"` -ge 21 ]]' 'source-file ~/dotfiles/tmux/tmux2.conf'
|
|
|
+
|
|
|
# Colours and status line.
|
|
|
source-file ~/dotfiles/tmux/tmuxcolours.conf
|