Compare commits

...

9 Commits

3 changed files with 16 additions and 8 deletions

View File

@@ -3,5 +3,9 @@
- apt: - apt:
- tmux - tmux
- xsel - xsel
- brew:
- tmux
- reattach-to-user-namespace
- symlink: - symlink:
- {src: tmux.conf, dst: ~/.tmux.conf} - {src: tmux.conf, dst: ~/.tmux.conf}
- {src: layouts/window-tall, dst: ~/.local/share/tmux/layouts/window-tall}

View File

@@ -10,7 +10,7 @@ bind Space send-prefix
set -s escape-time 0 set -s escape-time 0
# Increase scrollback buffer size # Increase scrollback buffer size
set -g history-limit 50000 set -g history-limit 1000000
# Set tmux messages display time to 4 seconds # Set tmux messages display time to 4 seconds
set -g display-time 4000 set -g display-time 4000
@@ -57,6 +57,8 @@ bind "%" split-window -h -c "#{pane_current_path}"
# Integrate pane selection with vim # Integrate pane selection with vim
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"' is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
unbind -T copy-mode-vi C-h
unbind -T copy-mode-vi C-j
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
@@ -64,15 +66,17 @@ bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Integrate urlview # Integrate urlview
bind-key u capture-pane \; split-window "tmux show-buffer | urlview -" bind u capture-pane \; split-window "tmux show-buffer | urlview -"
# Enter copy mode with C-U # Enter copy mode with C-U
bind-key C-u copy-mode -u bind C-u copy-mode -u
# Begin selection in copy mode with v not Space # Begin selection in copy mode with v not Space
bind-key -T copy-mode-vi v send-keys -X begin-selection bind -T copy-mode-vi v send-keys -X begin-selection
# Yank to the system clipboard in copy mode # Yank to the system clipboard in copy mode
if -b '[ "`uname`" = "Linux" ]' \ if -b '[ "`uname`" = "Darwin" ]' \
"bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xsel -i -p && xsel -o -p | xsel -i -b'" "bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'" \
"bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xsel -i -p && xsel -o -p | xsel -i -b'"
# Left status style # Left status style
set-window-option -g status-left " #S" set-window-option -g status-left " #S"
@@ -107,5 +111,5 @@ set-option -g pane-border-fg colour233
set-option -g pane-border-bg colour233 set-option -g pane-border-bg colour233
# Command line window list selection # Command line window list selection
set-window-option -g mode-style fg=colour233,bg=colour30 set-window-option -g mode-style fg=white,bg=colour237
set-option -g message-style fg=colour233,bg=colour30 set-option -g message-style fg=white,bg=colour237