-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
143 lines (103 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
# tmux settings
# http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/tmux.1#x4f5054494f4e53
# ----------------------------------------------------------------------
# | General Settings |
# ----------------------------------------------------------------------
# Make window index start at 1
#set -g base-index 1
# Make pane index start at 1
#setw -g pane-base-index 1
# Remove delay when sending commands and
# lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
# (default is 500 milliseconds)
set -sg escape-time 50
# Enable mouse support
#set-option -g mouse-select-pane on
set -g mouse on
# Lengthen Scroll History
set -g history-limit 50000
# title
set -g set-titles on
set -g set-titles-string '#T'
# ----------------------------------------------------------------------
# | Key Mappings |
# ----------------------------------------------------------------------
# Change the key combination for the PREFIX key to `ctrl-a`
#set -g prefix C-a
#unbind-key C-b
# Make tmux send the PREFIX to an application running
# within tmux simply by pressing PREFIX key twice
#bind C-a send-prefix
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Workaround for accessing macOS' pasteboard
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
if-shell \
'test "$(uname -s)" = Darwin' \
'set-option -g default-command "exec reattach-to-user-namespace -l $SHELL"'
# Remap the copy & paste keys to work as in vim
# Fix copy to Linux system clipboard: https://unix.stackexchange.com/q/131011
unbind [
bind Escape copy-mode
unbind P
bind P paste-buffer
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
bind -T copy-mode-vi r send-keys -X rectangle-toggle
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# [ PREFIX + - ] Split window horizontally
bind - split-window -v
# [ PREFIX + | ] Split window vertically
bind | split-window -h
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# [ PREFIX + h/j/k/l ] Move from pane to pane
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# [ PREFIX + H/J/K/L ] Resize pane
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# [ PREFIX + r ] Reload tmux config
bind r source-file ~/.tmux.conf \; display "tmux configs reloaded"
# ----------------------------------------------------------------------
# | Status bar |
# ----------------------------------------------------------------------
# Notified when something happens in one of the other windows
#setw -g monitor-activity on
set -g visual-activity on
# Periodically refresh the status bar
set -g status-interval 60
# Customize what is displayed
#set -g status-justify left
#set -g status-left-length 50
#set -g status-left "[#S] "
# └─ current session name
#set -g status-right " %R "
# └─ current time
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Default colors
set -g status-style bg=colour11,fg=black
# Colors for window list
setw -g window-status-style fg=black,bg=colour11,dim
#setw -g automatic-rename on
# Colors for active window
setw -g window-status-current-format "#I:#W"
setw -g window-status-current-style fg=black,bg=colour14,none
# ----------------------------------------------------------------------
# | Visual Styling |
# ----------------------------------------------------------------------
# Display things in 256 colors
set -g default-terminal "screen-256color"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Command Line
set -g message-style fg=black,bg=yellow,dim
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Pane divider
set -g pane-border-style fg=colour10,bg=default
set -g pane-active-border-style fg=colour12,bg=default
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -