-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
72 lines (56 loc) · 2.12 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# theme
source /usr/share/tmux/theme-pack-jimeh/powerline/double/cyan.tmuxtheme
# use C-a as prefix
set-option -g prefix C-a
unbind-key C-b
bind-key a send-prefix
# zshell
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
# misc
set -g default-terminal "screen-256color"
# set window title
set-option -g set-titles on
set-option -g set-titles-string '[#S:#I #H] #W'
# bind ^A space to switch to the next window to the right,
# ^A ctrl-space to switch to the next window to the left,
# and ^A ^A to switch to the last-used window:
bind-key C-a last-window
bind-key Space next-window
bind-key C-Space previous-window
# keys to swap windows
bind-key S-Left swap-window -t -1
bind-key S-Right swap-window -t +1
# start numbering windows at 1, not 0.
set -g base-index 1
set -g pane-base-index 1
# tell tmux to use xterm sequences for, e.g., ctrl-arrow.
set-window-option -g xterm-keys on # to make ctrl-arrow, etc. work
# disable automatic renaming of windows
set-window-option -g automatic-rename off
# more scrollback history
set -g history-limit 100000
# notifications
setw -g monitor-activity on
set -g visual-activity on
# mouse
set -g mouse on
# smart pane switching with awareness of Vim splits.
# see: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n M-Left if-shell "$is_vim" "send-keys left" "select-pane -L"
bind-key -n M-Down if-shell "$is_vim" "send-keys down" "select-pane -D"
bind-key -n M-Up if-shell "$is_vim" "send-keys up" "select-pane -U"
bind-key -n M-Right if-shell "$is_vim" "send-keys right" "select-pane -R"
bind-key -T copy-mode-vi M-Left select-pane -L
bind-key -T copy-mode-vi M-Down select-pane -D
bind-key -T copy-mode-vi M-Up select-pane -U
bind-key -T copy-mode-vi M-Right select-pane -R
# copy-mode shortcuts
bind-key -n F4 copy-mode
run-shell ~/.tmux.d/extrakto/extrakto.tmux
set -g @extrakto_copy_key "tab" # use tab to copy to clipboard
set -g @extrakto_insert_key "enter" # use enter to insert selection
# use vi shortcuts in copy-mode
setw -g mode-keys vi