-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
134 lines (111 loc) · 3.55 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
# Reset keybindings
unbind-key -a
#source-file ~/.tmux.reset.conf
# Use UTF-8 .
#set -g utf-8
#set-window-option -g utf-8 on
# Trying ZSH
#set-option -g default-shell /bin/zsh
# Automatically set window title
set-window-option -g automatic-rename off
set-option -g set-titles on
# Set scrollback history size.
set -g history-limit 65536
# Set prefix.
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Indexes start with numkey `1` .
set-option -g base-index 1
setw -g pane-base-index 1
# No delay for ESC keypress.
set -sg escape-time 0
# Prevent unwanted exit with CTRL-d .
set-environment -g 'IGNOREEOF' 2
# Command prompt
bind : command-prompt
# Layouts
bind Space next-layout
bind C-o rotate-window
# Manage sessions.
bind C-q new
bind S kill-session
bind s choose-tree -sw
bind . command-prompt -I "rename-session "
bind d detach-client
#bind D choose-client
# Manage windows.
bind C-w new-window -c '#{pane_current_path}'
bind W kill-window
bind -n C-n next-window
bind -n C-p previous-window
bind , command-prompt -I "rename-window "
# Manage panes.
bind h split-window -h -c '#{pane_current_path}'
bind v split-window -v -c '#{pane_current_path}'
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind -n S-Left resize-pane -L
bind -n S-Right resize-pane -R
bind -n S-Up resize-pane -U
bind -n S-Down resize-pane -D
bind z resize-pane -Z
bind q display-panes
bind K killp
bind Up select-pane -U
bind Down select-pane -D
bind Left select-pane -L
bind Right select-pane -R
# Configuration.
bind R source-file /etc/tmux.conf\; display "Reloaded global config."
bind r source-file ~/.tmux.conf\; display "Reloaded user config."
bind C-m split-window -h "nvim ~/.tmux.conf"
# Open ranger
#bind + send-keys ranger Enter
bind + split-window -v -c '#{pane_current_path}' "ranger"
bind - new-window -c '#{pane_current_path}' "ranger"
# Mouse
bind m set-option -g -q mouse on
bind M set-option -g -q mouse off
bind -n MouseDown1Pane select-pane -t =
bind -n MouseDown1Status select-window -t =
bind -n MouseDrag1Border resize-pane -M
#bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelUpPane select-pane -t= \; copy-mode -e\; send-keys -M
bind -n WheelDownPane select-pane -t= \; send-keys -M
# { Copy/Paste.
bind-key Escape copy-mode
# Use vi-style keybindings in copy mode.
setw -g mode-keys vi
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
bind-key -Tcopy-mode-vi Escape send -X cancel
bind-key -Tcopy-mode-vi 'Y' send -X copy-pipe 'xclip -in -selection clipboard > /dev/null'
bind-key p paste-buffer
# }
# Miscellaneous
# Docker status window
bind C-d new-session "watch docker ps -a" \;\
rename-session "docker-monitor" \;\
split-window -h "watch docker images" \;\
split-window -v "watch docker volume ls" \;\
split-window -v "watch docker network ls" \;\
select-pane -L \;\
split-window -v
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Theme plugins
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'seebi/tmux-colors-solarized'
set -g @plugin 'ndyakov/pimux'
# Theme source file
# source-file ~/.tmux/plugins/tmux-themepack/powerline/block/green.tmuxtheme
# Themes
# set -g @themepack 'block/green'
# set -g @colors-solarized '256'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'