-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
101 lines (81 loc) · 3.03 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
# Author: Aymeric Beaumet <hi@aymericbeaumet.com> (https://aymericbeaumet.com)
# Github: @aymericbeaumet/dotfiles
# C-Q bindings
unbind C-b
set -g prefix C-q
bind C-q send-prefix
unbind c
bind t new-window -a -c "#{pane_current_path}"
bind C-t new-window -a -c "#{pane_current_path}"
bind n next-window
bind C-n next-window
bind p previous-window
bind C-p previous-window
bind v split-window -h -c "#{pane_current_path}"
bind C-v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
bind C-s split-window -v -c "#{pane_current_path}"
bind h if -F '#{pane_at_left}' '' 'select-pane -L'
bind BSpace if -F '#{pane_at_left}' '' 'select-pane -L'
bind j if -F '#{pane_at_bottom}' '' 'select-pane -D'
bind C-j if -F '#{pane_at_bottom}' '' 'select-pane -D'
bind k if -F '#{pane_at_top}' '' 'select-pane -U'
bind C-k if -F '#{pane_at_top}' '' 'select-pane -U'
bind l if -F '#{pane_at_right}' '' 'select-pane -R'
bind C-l if -F '#{pane_at_right}' '' 'select-pane -R'
bind H swap-pane -s '{left-of}'
bind J swap-pane -s '{down-of}'
bind K swap-pane -s '{up-of}'
bind L swap-pane -s '{right-of}'
bind / command-prompt -p "(search down)" "copy-mode; send -X search-forward \"%%%\""
bind ? command-prompt -p "(search up)" "copy-mode; send -X search-backward \"%%%\""
bind q kill-pane
bind r source "$HOME/.tmux.conf"
# copy mode bindings
set -g mode-keys vi
set -g escape-time 0
bind -T copy-mode-vi enter send -X copy-pipe-and-cancel "squeeze -1 --url --open"
bind -T copy-mode-vi escape send -X cancel
bind -T copy-mode-vi d send -X halfpage-down
bind -T copy-mode-vi u send -X halfpage-up
bind -T copy-mode-vi u send -X halfpage-up
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe "pbcopy"
# Status bindings
set -g status-keys emacs
# Agressively resize
setw -g aggressive-resize on
# Increase history limit
set -g history-limit 1000000
# Quiet
set -g visual-activity off
set -g visual-bell off
set -g visual-silence off
set -gw monitor-activity off
set -g bell-action none
# Enable mouse support
set -g mouse on
# enable 256 colors
set -g default-terminal "screen-256color"
set -sa terminal-overrides ',xterm-256color:RGB'
# windows
set -g base-index 1
set -g allow-rename off
set -g automatic-rename off
set -g window-status-format " #(basename '#{b:pane_current_path}'):#{pane_current_command}"
set -g window-status-current-format " #[underscore]#(basename '#{b:pane_current_path}'):#{pane_current_command}"
# panes
set -g pane-border-style fg=white
setw -g pane-base-index 1
# status bar
set -g status off
set -g status-interval 1
set -g status-position top
set -g status-style fg=white,bg=color232
set -g status-left " "
set -g status-right "%a %d %b %R "
set -g status-right-length 64
set -g status-format[1] '' # reset line 2
# copy mode theme
set -g mode-style fg=colour255,bg=colour178
set-hook -g pane-mode-changed 'if -F "#{m/r:(copy|view)-mode,#{pane_mode}}" "set status-style fg=colour255,bg=colour178" "set -u status-style"'