-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
165 lines (128 loc) · 3.5 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
161
162
163
164
# $Id: .tmux.conf,v 1.16 2020/12/07 11:47:20 cvs Exp $
# Do not start a login shell by default
set -g default-command "${SHELL}"
# Set window notifications
setw -g monitor-activity off
set -g visual-activity on
# I am using a 256 color terminal
# if this is set to tmux-256color vim will show A,C,D,E chars when pressing
# Arrow keys in insert mode inside tmux. Setting it to xterm-256 fixes it
set -g default-terminal "xterm-256color"
set-option -a terminal-overrides ",*256col*:RGB"
set-window-option -g xterm-keys on
# Reduce escape timeout to avoid false positives with libtermkey apps
# See pkg-readmes/libtermkey on OpenBSD
set-option escape-time 40
# Disable active pane border indicator
set -g pane-active-border-style bg=black,fg=white
# Scrollback limit
set -g history-limit 10000
# bind a reload key
bind R source-file ~/.tmux.conf \; display-message "Config reloaded.."
# window list
setw -g automatic-rename on
# Set the prefix to `
unbind C-b
set -g prefix `
bind ` send-prefix
# screen ^C c
unbind ^C
bind ^C new-window
unbind c
bind c new-window
# detach ^D d
unbind ^D
bind ^D detach
# displays *
unbind *
bind * list-clients
# Next window with space and n
unbind " "
bind " " next-window
unbind n
bind n next-window
# title A
unbind A
bind A command-prompt "rename-window %%"
# Switch windows
unbind ]
bind ] last-window
unbind a
bind a last-window
# Previous window with p
unbind p
bind p previous-window
# windows ^W w
unbind ^W
bind ^W list-windows
unbind w
bind w list-windows
# quit \
unbind '\'
bind '\' confirm-before "kill-server"
# kill K k
unbind K
bind K confirm-before "kill-window"
unbind k
bind k confirm-before "kill-window"
# redisplay ^L l
unbind ^L
bind ^L refresh-client
unbind l
bind l refresh-client
# split -v |
unbind |
bind | split-window
# Split window horizontally
unbind Enter
bind Enter split-window -h
# :kB: focus up
unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-
unbind [
bind [ select-pane -t:.+
# Toogle layouts
unbind /
bind / next-layout
# " windowlist -b
unbind '"'
#bind '"' choose-window
# Use C-a F12 to disable outer session
# Copied from https://github.com/samoshkin/tmux-config/blob/master/tmux/tmux.conf
bind -T off F12 \
set -u prefix \;\
set -u key-table \;\
set -u status-style \;\
set -u window-status-current-style \;\
set -u window-status-current-format \;\
refresh-client -S
bind -T root F12 \
set prefix None \;\
set key-table off \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\
# Colors copied from https://gitlab.com/root-bsd1/openbsd-configs
# modes
setw -g clock-mode-colour colour2
setw -g mode-style 'fg=colour8 bg=colour36 bold'
# panes
set -g pane-border-style 'fg=colour23 bg=colour0'
set -g pane-active-border-style 'bg=colour0 fg=colour36'
setw -g pane-border-lines heavy
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=colour29 fg=colour0 dim'
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour42] #T %Y-%m-%d #[fg=colour233,bg=colour42] %I:%M '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style 'fg=colour0 bg=colour36 bold'
setw -g window-status-current-format ' #I#[fg=colour0]:#[fg=colour233]#W#[fg=colour234]#F '
setw -g window-status-style 'fg=colour49 bg=colour233'
setw -g window-status-format ' #I#[fg=colour192]:#[fg=colour193]#W#[fg=colour194]#F '
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
# messages
set -g message-style 'fg=colour232 bg=colour16 bold'