-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
110 lines (91 loc) · 3.44 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
## Tmux settings
# Address vim mode switching delay (default: 15)
# http://superuser.com/a/252717/65504
set -s escape-time 10
# Count windows from 1, so window switching follows the keyboard's num row
set -g base-index 1
setw -g pane-base-index 1
# Renumber windows sequentially after closing any of them
set -g renumber-windows on
# Change prefix to Ctrl+a
set -g prefix C-a
bind C-a send-prefix
unbind C-b
# Switch windows
bind -n C-S-Left previous-window
bind -n C-S-Down new-window
bind -n C-S-Right next-window
# Switch panes
bind -n S-Left select-pane -L
bind -n S-Down select-pane -D
bind -n S-Up select-pane -U
bind -n S-Right select-pane -R
# Use <prefix> with - and | (\) for splitting panes
bind \\ split-window -h
bind - split-window -v
unbind '"'
unbind '%'
# Use <prefix> with r to reload the tmux config
bind r source-file ~/.tmux.conf \; display 'Config reloaded'
# Increase scrollback buffer size (default: 2000)
set -g history-limit 10000
# Refresh 'status-left' and 'status-right' more often
#set -g status-interval 5
# Enable focus events for terminals that support them
set -g focus-events on
# Better resizing when switching between monitors
setw -g aggressive-resize on
# Enable mouse mode
set -g mouse on
bind m set -g mouse on \; display 'Mouse ON'
bind M set -g mouse off \; display 'Mouse OFF'
# Use Vi shortcuts
setw -g mode-keys vi
# Use Vi-style copy/paste when in copy mode (prefix+[)
bind P paste-buffer
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi r send -X rectangle-toggle
bind -T copy-mode-vi Space send -X halfpage-down
bind -T copy-mode-vi Bspace send -X halfpage-up
bind -T copy-mode-vi Escape send -X cancel
# Copy mouse selection to clipboard
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe 'pbcopy' \; display 'Copied to clipboard'
# `y` or Enter copies selection to clipboard
bind -T copy-mode-vi y send -X copy-pipe 'pbcopy' \; display 'Copied to clipboard'
bind -T copy-mode-vi Enter send -X copy-pipe 'pbcopy' \; display 'Copied to clipboard'
# `Y` copies selection to Windows clipboard and pastes to the prompt
bind -T copy-mode-vi Y send -X copy-pipe 'pbcopy; tmux paste-buffer'
# Double click to select word
bind -T copy-mode-vi DoubleClick1Pane select-pane \; send -X select-word
bind -n DoubleClick1Pane select-pane \; copy-mode -M \; send -X select-word
# Triple click to select line
bind -T copy-mode-vi TripleClick1Pane select-pane \; send -X select-line
bind -n TripleClick1Pane select-pane \; copy-mode -M \; send -X select-line
# Disable annoying bell
set -g bell-action none
set -g visual-bell on
# Display messages for 2 seconds (default: 750)
set -g display-time 2000
# Set theme / status bar (Dracula-based)
# https://spec.draculatheme.com/#sec-Color-Palette
dark_gray='#282a36' # background
white='#f8f8f2' # foreground
gray='#44475a' # selection
dark_purple='#6272a4' # comment
red='#ff5555'
orange='#ffb86c'
yellow='#f1fa8c'
green='#50fa7b'
purple='#bd93f9'
cyan='#8Be9fd'
pink='#ff79c6'
set -g status-interval 5
set -g status-left-length 100
set -g status-right-length 100
set -g pane-active-border-style "fg=${purple}"
set -g pane-border-style "fg=${gray}"
set -g message-style "bg=${gray},fg=${white}"
set -g status-style "bg=${gray},fg=${white}"
set -g status-left "#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${pink}],} #(whoami)@#h "
#set -g status-right "#[bg=${orange},fg=${dark_gray}] "
setw -g window-status-current-format "#[bg=${dark_purple},fg=${white}] #I #W "