correct handling between different tmux versions
This commit is contained in:
17
.tmux.conf
17
.tmux.conf
@@ -2,6 +2,9 @@
|
|||||||
### Defaults
|
### Defaults
|
||||||
##########################################
|
##########################################
|
||||||
|
|
||||||
|
# get tmux version
|
||||||
|
run-shell "tmux setenv -g TMUX_VERSION $(tmux -V | cut -c 6-)"
|
||||||
|
|
||||||
# bind ctrl+a to tmux prefix
|
# bind ctrl+a to tmux prefix
|
||||||
unbind C-b
|
unbind C-b
|
||||||
set -g prefix C-a
|
set -g prefix C-a
|
||||||
@@ -32,11 +35,10 @@ set-option -g visual-bell off
|
|||||||
set-option -g visual-silence off
|
set-option -g visual-silence off
|
||||||
set-option -g bell-action none
|
set-option -g bell-action none
|
||||||
|
|
||||||
# mouse
|
# set mouse modes
|
||||||
set -g mode-mouse on
|
if-shell '[[ $(echo "$(tmux -V | cut -d" " -f2) >= 2.1" | bc) -eq 1 ]]' \
|
||||||
set -g mouse-select-pane on
|
'set -g mouse on' \
|
||||||
set -g mouse-resize-pane
|
'set -g mode-mouse on; set -g mouse-resize-pane on; set -g mouse-select-pane on; set -g mouse-select-window on'
|
||||||
set -g mouse-select-window on
|
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
### Styling
|
### Styling
|
||||||
@@ -49,7 +51,10 @@ set -g pane-active-border-bg colour236
|
|||||||
set -g pane-active-border-fg colour51
|
set -g pane-active-border-fg colour51
|
||||||
|
|
||||||
# status line
|
# status line
|
||||||
set -g status-utf8 on
|
# UTF8 is autodetected in 2.2 onwards, but errors if explicitly set
|
||||||
|
if-shell '[[ $(echo "$(tmux -V | cut -d" " -f2) < 2.2" | bc) -eq 1 ]]' \
|
||||||
|
'set -g status-utf8 on;'
|
||||||
|
|
||||||
set -g status-justify left
|
set -g status-justify left
|
||||||
set -g status-interval 2
|
set -g status-interval 2
|
||||||
set -g status-bg colour234
|
set -g status-bg colour234
|
||||||
|
|||||||
Reference in New Issue
Block a user