-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathtmux.conf
154 lines (123 loc) · 4.36 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
# SETTINGS {{{
# --------------------------------------------------------------------------------
# Set TERM
set-option -g default-terminal "screen-256color"
# Set terminal window title
set-option -g set-titles on
set-option -g set-titles-string '#S (#{pane_current_path})'
# Start indices on correct side of keyboard
set-option -g base-index 1
# Allow faster command sequences
set-option -s escape-time 0
# Use vi-like status and mode keys
set-option -g status-keys vi
set-option -g mode-keys vi
# Fix for clipboard access
set-option -g default-command "reattach-to-user-namespace -l $SHELL"
# Keep messages on screen longer
set-option -g display-time 2000
# Don't show a message for any activity type
set-option -g visual-activity off
set-option -g visual-bell off
# Prefs for pre-defined layouts
set-window-option -g main-pane-height 60
set-window-option -g main-pane-width 180
# Aggressively resize windows
set-window-option -g aggressive-resize on
# Set window notifications
# Watch for activity in windows and highlight in status bar
set-window-option -g monitor-activity on
# }}}
# KEY BINDINGS {{{
# --------------------------------------------------------------------------------
# Remap prefix to C-a
unbind-key C-b
set-option -g prefix C-a
bind-key a send-prefix
# Last window and pane
unbind-key '\;'
bind-key C-a last-pane
bind-key Tab last-window
# Easier copy mode
bind-key -n PPage copy-mode -u
bind-key Escape copy-mode
unbind-key p
bind-key p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'V' rectangle-toggle
bind-key -t vi-copy 'y' copy-pipe "pbcopy"
# Server/session/window/pane creation/destruction/renaming
unbind-key '$'
unbind-key '&'
unbind-key ','
bind-key c new-window -c '#{pane_current_path}'
bind-key C command-prompt "new-session -s '%%'"
bind-key G command-prompt "run-shell 'tmuxinator start %%'"
bind-key n command-prompt -I '#W' "rename-window '%%'"
bind-key N command-prompt -I '#S' "rename-session '%%'"
bind-key x kill-pane
bind-key X kill-window
bind-key q command-prompt -I '#S' "kill-session -t '%%'"
bind-key Q confirm-before kill-server
# Easier splits
unbind-key '"'
unbind-key '%'
bind-key | split-window -h
bind-key _ split-window -v
# Resize and navigate splits
unbind-key H
unbind-key L
unbind-key J
unbind-key K
bind-key -r H resize-pane -L 5
bind-key -r L resize-pane -R 5
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
unbind-key h
unbind-key l
unbind-key j
unbind-key k
bind-key h select-pane -L
bind-key l select-pane -R
bind-key j select-pane -D
bind-key k select-pane -U
# Quickly source config
bind-key S source-file ~/.tmux.conf \; display-message "Config reloaded..."
# }}}
# APPEARANCE {{{
# --------------------------------------------------------------------------------
# Status bar
set-option -g status-left ' #S #[fg=brightyellow,bg=black]#(~/bin/org-clock-current-task.sh)'
set-option -g status-right '#[fg=green]#(~/bin/new-message-count.fish)'
set-option -g status-left-attr bold
set-option -g status-left-fg black
set-option -g status-left-bg green
set-option -g status-right-fg brightblack
set-option -g status-right-bg black
set-option -g status-left-length 60
set-option -g status-right-length 60
set-window-option -g window-status-format ' (#I) #W '
set-window-option -g window-status-current-format ' (#I) #W '
set-window-option -g status-fg white
set-window-option -g status-bg brightblack
# Current window tab
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg black
# Window tab triggered by bell
set-window-option -g window-status-bell-fg red
set-window-option -g window-status-bell-bg white
# Window tab triggered by output
set-window-option -g window-status-activity-fg blue
set-window-option -g window-status-activity-bg white
set-window-option -g mode-fg black
set-window-option -g mode-bg brightblue
set-option -g pane-border-fg black
set-option -g pane-active-border-fg brightblack
set-option -g message-fg white
set-option -g message-bg red
# }}}
# SESSIONS {{{
# --------------------------------------------------------------------------------
new-session -ADs nox
# }}}
# vim: foldmethod=marker