-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
160 lines (122 loc) · 4.95 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# set -g default-terminal "screen-256color"
# set -g default-terminal "tmux"
# set -g default-terminal "screen-256color"
# set-option -ga terminal-overrides ",*256col*:Tc"
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",*256col*:Tc"
# set -g default-terminal "rxvt-unicode-256color"
set -g default-shell "/usr/bin/fish"
set -g history-limit 50000
# disambiguate alt/esc quickly
set-option -sg escape-time 5
# text copy mode
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
bind-key -T copy-mode-vi 'C-v' send-keys -X rectangle-toggle
# reload of config file
bind R source-file ~/.tmux.conf \; display-message "~/.tmux.conf loaded"
# quit other clients
bind q attach-session -d
bind Q display-panes
# don't mess with me tmux
set -g mouse off
# Start numbering at 1
set -g base-index 1
set -g pane-base-index 1
bind 0 select-window -t :10
# Renumber when panes close
set -g renumber-windows on
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Highlight active window
# set-window-option -g window-status-current-bg black
# set-window-option -g window-status-current-fg white
# Automatically set window title
setw -g automatic-rename on
# Automatically set tmux's title
set -g set-titles on
set -g set-titles-string "#T [#S/#W]"
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# pane movement
bind-key J command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key S command-prompt -p "send pane to:" "join-pane -t '%%'"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind L last-window
# pane splitting
bind-key v split-window -h -c "#{pane_current_path}"
bind-key s split-window -v -c "#{pane_current_path}"
# new window with path
bind-key N new-window -c "#{pane_current_path}"
# Toggle statusbar
bind a set -q status
#-- Misc Colours --------------------------------------------------------------
# Border Colours
# set -g pane-active-border-bg default
# set -g pane-active-border-fg colour240
# set -g pane-border-bg default
# set -g pane-border-fg colour235
#-- Statusbar -----------------------------------------------------------------
# Status refresh interval in seconds
set -g status-interval 5
# Default sb colours (256 -- love me some gray)
set -g status-bg colour235
set -g status-fg white
# Window title colors
# set-window-option -g window-status-fg colour240
# set-window-option -g window-status-bg default
# set-window-option -g window-status-attr dim
# set-window-option -g window-status-current-fg white
# set-window-option -g window-status-current-bg colour237
# set-window-option -g window-status-current-attr default
# Command/message line colors
# set -g message-fg black
# set -g message-bg green
# Hide status bar by default
set -g status off
source ~/.tmux.conf.local
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_selection 'clipboard'
set -g @plugin 'tmux-plugins/tmux-open'
# 'o' in copy mode opens selection
# 'C-o' in copy mode edits selection in $EDITOR
set -g @plugin 'tmux-plugins/tmux-sessionist'
# prefix + g - prompts for session name and switches to it. Performs 'kind-of' name completion.
# prefix + C (shift + c) - prompt for creating a new session by name.
# prefix + X (shift + x) - kill current session without detaching tmux.
# prefix + S (shift + s) - switches to the last session.
# prefix + @ - promote current pane into a new session.
# Analogous to how prefix + ! breaks current pane to a new window.
set -g @plugin 'tmux-plugins/tmux-logging'
# save complete history prefix + alt + shift + p
# toggle logging prefix + shift + p
# screen grab prefix + alt + p
# clear pane history prefix + alt + c
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @copycat_prev 'p'
# This one works better for short git logs
bind-key C-h run-shell "/home/ponder/.tmux/plugins/tmux-copycat/scripts/copycat_mode_start.sh '[0-9a-f]{7,40}'"
# prefix + alt-h - jumping over SHA-1 hashes (best used after git log command)
# prefix + ctrl-f - simple file search
# prefix + ctrl-g - jumping over git status files (best used after git status command)
# prefix + ctrl-u - url search (http, ftp and git urls)
# prefix + ctrl-d - number search (mnemonic d, as digit)
# prefix + alt-i - ip address search
set -g @plugin 'tmux-plugins/tmux-resurrect'
# prefix + ctrl+s - save
# prefix + ctrl+r - restore
set -g @plugin 'laktak/extrakto'
# prefix + tab to start fuzzy completion with current pane text as source
# In fuzzy complete mode, press to do with selection:
# Tab to insert into current pane
# Enter to copy to clipboard
# ctrl-o to open the path/url
# ctrl-e to edit with $EDITOR
run '~/.tmux/plugins/tpm/tpm'