aboutsummaryrefslogtreecommitdiffstats
path: root/_tmux.conf
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-09-04 11:03:01 +0800
committerAaron LI <aly@aaronly.me>2017-09-04 11:03:01 +0800
commit539db99fc39d0295aefad5627658f50a8bb00460 (patch)
treefb5b490eba93f32c972acf552bbab56143535c3c /_tmux.conf
parent2accf95a3749c320d3c6b62e0803a35f35e65401 (diff)
downloaddotfiles-539db99fc39d0295aefad5627658f50a8bb00460.tar.bz2
tmux.conf: replace "%if" with "if-shell"; fix two mistakes
Diffstat (limited to '_tmux.conf')
-rw-r--r--_tmux.conf10
1 files changed, 4 insertions, 6 deletions
diff --git a/_tmux.conf b/_tmux.conf
index 13327de..18026d5 100644
--- a/_tmux.conf
+++ b/_tmux.conf
@@ -75,7 +75,6 @@ set -g xterm-keys on
# Turn the mouse on, but without copy mode dragging
set -g mouse on
unbind -n MouseDrag1Pane
-unbind -T copy-mode MouseDrag1Pane
# Change the default $TERM to screen-256color
# * xterm-256color for tmux may have problem with special keys in zsh
@@ -165,12 +164,10 @@ set -g status-left " #[fg=yellow]#h:#[fg=blue]#S #[fg=magenta]>>#[defaul
set -g status-right "#[fg=magenta]<< #[fg=yellow]%a %m/%d #[fg=blue]%H:%M "
# If running inside tmux ($TMUX is set), then change the status line to red
-%if #{TMUX}
-set -g status-bg red
-%endif
+if-shell -b '[ -n "$TMUX" ]' "set -g status-bg red"
# Window status
-set -g window-status-separator " "
+setw -g window-status-separator " "
setw -g window-status-style "fg=blue,bold"
setw -g window-status-current-style "fg=blue,bold,reverse"
setw -g window-status-bell-style "fg=red,bold"
@@ -216,7 +213,8 @@ if-shell -b '[ "$(echo "$TMUX_VERSION < 2.2" | bc)" = 1 ]' \
# Credit: https://shapeshed.com/custom-vim-bindings-in-tmux-2-4/
# See also: https://github.com/tmux/tmux/issues/754
if-shell -b '[ "$(echo "$TMUX_VERSION >= 2.4" | bc)" = 1 ]' \
- "bind -T copy-mode-vi 'v' send -X begin-selection; \
+ "unbind -T copy-mode MouseDrag1Pane; \
+ bind -T copy-mode-vi 'v' send -X begin-selection; \
bind -T copy-mode-vi 'V' send -X select-line; \
bind -T copy-mode-vi 'r' send -X rectangle-toggle; \
bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel \