-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
102 lines (86 loc) · 2.75 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
# Tmux config
# Keybindings {{{
# Prefix key
set-option -g prefix C-q
bind-key C-q send-prefix
# Unbind
unbind C-b
unbind-key q
unbind-key '"'
unbind-key %
# Bindings
bind-key v split-window -h
bind-key h split-window -v
bind-key R source-file ~/.tmux.conf
# Switch panes using Alt-HJKL
bind-key -n M-h select-pane -L
bind-key -n M-l select-pane -R
bind-key -n M-k select-pane -U
bind-key -n M-j select-pane -D
bind-key -n M-H resize-pane -L 10
bind-key -n M-L resize-pane -R 10
bind-key -n M-K resize-pane -U 10
bind-key -n M-J resize-pane -D 10
bind-key C-q set-option -g status
# Layouts
bind-key V select-layout even-horizontal
bind-key H select-layout even-vertical
bind-key o set-window-option synchronize-panes
# Window controls
bind-key r command-prompt 'rename-window %%'
# }}}
# Compatibility issues {{{
# Newer version
set -g mouse on # Enable mouse for scrollback
set -g set-clipboard off
set -g mode-style "fg=black,bg=blue"
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T prefix j copy-mode
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"
# Older version
#set -g mode-mouse on
#set -g mouse-resize-pane on
#set -g mouse-select-pane on
#set -g mouse-select-window on
#bind-key -t vi-copy 'v' begin-selection
#bind-key -t vi-copy 'y' copy-selection
#bind-key j copy-mode
# }}}
# Settings {{{
set -g default-terminal "st-256color" # 256 colors and fix italics
set -g history-limit 5000 # Set scrollback buffer size
# set -g exit-unattached on # Exit server when no clients are attached
# set -g destroy-unattached on # Destroy session if no clients are attached
set -s escape-time 0 # Escape delay fix
set -g mode-keys vi
set -g status-keys vi
# }}}
# Status and colors {{{
set -g status off
set -g status-position top
set -g status-interval 1
set -g status-left "#[fg=black,bg=blue,bold] #S#[fg=blue,bg=black,nobold,noitalics,nounderscore]"
set -g status-right ""
set -g status-bg black
set -g status-fg white
set -g clock-mode-colour blue
set -g status-style "none"
set -g status-justify left
# Window status
set -g window-status-format " #I #W #F"
set -g window-status-current-format " #[bold]#I #W #F"
set -g window-status-separator " "
# Panes
set -g pane-border-style bg=black
set -g pane-border-style fg=black
set -g pane-active-border-style bg=black
set -g pane-active-border-style fg=brightblack
set -g display-panes-colour black
set -g display-panes-active-colour brightblack
# Messages
set -g message-style fg=blue
set -g message-style bg=brightblack
set -g message-command-style fg=blue
set -g message-command-style bg=brightblack
# }}}