Compare commits
9 Commits
future
...
25d7c10240
| Author | SHA1 | Date | |
|---|---|---|---|
| 25d7c10240 | |||
| 943412c159 | |||
| 7cb6fec680 | |||
| f9f72c13ba | |||
| 69ad546317 | |||
| eafbe27379 | |||
| 94ee8df2f9 | |||
| a180f60a98 | |||
| fdcf4c701c |
@@ -1,15 +1,11 @@
|
|||||||
---
|
---
|
||||||
- location: ~/.config/tmux
|
- location: ~/.config/tmux
|
||||||
- apt:
|
- apt:
|
||||||
- libevent-dev
|
- tmux
|
||||||
- ncurses-dev
|
|
||||||
- xsel
|
- xsel
|
||||||
- repo:
|
- brew:
|
||||||
- url: 'https://github.com/tmux/tmux.git'
|
- tmux
|
||||||
location: ~/.local/src/tmux
|
- reattach-to-user-namespace
|
||||||
branch: 2.6
|
|
||||||
actions:
|
|
||||||
- command: ./configure --prefix=$HOME/.local
|
|
||||||
- command: {install: make -j8 install, remove: make uninstall}
|
|
||||||
- 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}
|
||||||
|
|||||||
20
tmux.conf
20
tmux.conf
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user