Compare commits
1 Commits
25d7c10240
...
future
| Author | SHA1 | Date | |
|---|---|---|---|
| cc688392da |
@@ -1,11 +1,15 @@
|
||||
---
|
||||
- location: ~/.config/tmux
|
||||
- apt:
|
||||
- tmux
|
||||
- libevent-dev
|
||||
- ncurses-dev
|
||||
- xsel
|
||||
- brew:
|
||||
- tmux
|
||||
- reattach-to-user-namespace
|
||||
- repo:
|
||||
- url: 'https://github.com/tmux/tmux.git'
|
||||
location: ~/.local/src/tmux
|
||||
branch: 2.6
|
||||
actions:
|
||||
- command: ./configure --prefix=$HOME/.local
|
||||
- command: {install: make -j8 install, remove: make uninstall}
|
||||
- symlink:
|
||||
- {src: tmux.conf, dst: ~/.tmux.conf}
|
||||
- {src: layouts/window-tall, dst: ~/.local/share/tmux/layouts/window-tall}
|
||||
|
||||
20
tmux.conf
20
tmux.conf
@@ -10,7 +10,7 @@ bind Space send-prefix
|
||||
set -s escape-time 0
|
||||
|
||||
# Increase scrollback buffer size
|
||||
set -g history-limit 1000000
|
||||
set -g history-limit 50000
|
||||
|
||||
# Set tmux messages display time to 4 seconds
|
||||
set -g display-time 4000
|
||||
@@ -57,8 +57,6 @@ bind "%" split-window -h -c "#{pane_current_path}"
|
||||
|
||||
# Integrate pane selection with vim
|
||||
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-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"
|
||||
@@ -66,17 +64,15 @@ 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"
|
||||
|
||||
# Integrate urlview
|
||||
bind u capture-pane \; split-window "tmux show-buffer | urlview -"
|
||||
bind-key u capture-pane \; split-window "tmux show-buffer | urlview -"
|
||||
|
||||
# Enter copy mode with C-U
|
||||
bind C-u copy-mode -u
|
||||
|
||||
bind-key C-u copy-mode -u
|
||||
# Begin selection in copy mode with v not Space
|
||||
bind -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
# Yank to the system clipboard in copy mode
|
||||
if -b '[ "`uname`" = "Darwin" ]' \
|
||||
"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'"
|
||||
if -b '[ "`uname`" = "Linux" ]' \
|
||||
"bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xsel -i -p && xsel -o -p | xsel -i -b'"
|
||||
|
||||
# Left status style
|
||||
set-window-option -g status-left " #S"
|
||||
@@ -111,5 +107,5 @@ set-option -g pane-border-fg colour233
|
||||
set-option -g pane-border-bg colour233
|
||||
|
||||
# Command line window list selection
|
||||
set-window-option -g mode-style fg=white,bg=colour237
|
||||
set-option -g message-style fg=white,bg=colour237
|
||||
set-window-option -g mode-style fg=colour233,bg=colour30
|
||||
set-option -g message-style fg=colour233,bg=colour30
|
||||
|
||||
Reference in New Issue
Block a user