-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
123 lines (103 loc) · 3.69 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
# ==== Common ====
set -g default-command /bin/zsh
# rebind PREFIX to C-a
set-option -g prefix C-a
# set title for terminal(using tmux sesion/window name)
set-option -g set-titles on
set-option -g set-titles-string "#S / #W"
# send interval to 1s to avoid conflicts with vim
set -sg escape-time 1
# set session starts with 1
set -g base-index 1
# set pane starts with 1
setw -g pane-base-index 1
# enable mouse
set -g mouse on
# set history limit
set -g history-limit 10000
# reload config
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# send C-a to other apps
bind C-a send-prefix
# split window horizontally
bind | split-window -h -c "#{pane_current_path}"
# split window vertically
bind - split-window -v -c "#{pane_current_path}"
# create new window with current path
bind c new-window -c "#{pane_current_path}"
# reorder windows
bind R \
move-window -r\; \
display-message "Windows reordered..."
# move cursor between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# rename session/window
bind n command-prompt 'rename-window %%'
bind N command-prompt 'rename-session %%'
# switch window
bind-key , previous-window # <
bind-key . next-window # >
bind-key < swap-window -t :-
bind-key > swap-window -t :+
# clear screen
bind-key C-k send-keys -R \; clear-history\; send-keys "Enter"
# move cursor between windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# ajdust pane size
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
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.config/tmux/plugins/tpm/tpm'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-continuum'
# set -g @continuum-restore 'off'
# set -g @continuum-save-interval '30'
# Colors
set -g default-terminal "screen-256color"
set -g terminal-overrides ',xterm-256color:Tc'
# Dracula Color
white='#f8f8f2' # Foreground
dark_gray='#282a36' # Background
gray='#44475a' # Current Line / Selection
light_purple='#bd93f9' # Purple
dark_purple='#6272a4' # Comment
cyan='#8be9fd' # Cyan
green='#50fa7b' # Green
orange='#ffb86c' # Orange
red='#ff5555' # Red
pink='#ff79c6' # Pink
yellow='#f1fa8c' # Yellow
set -g status on
set -g status-fg $dark_purple
set -g status-bg $gray
set -g status-justify left
set -g status-interval 1
set -g status-left-length 100
set -g status-right-length 100
# Options -> ⧉ ❐
set -g status-left "#{?client_prefix,#[fg=$dark_gray bg=$green],#[fg=$dark_gray bg=$light_purple]} ⧉ #S "
set -g status-right "#[fg=$white] #{pane_current_path}"
set-window-option -g window-status-current-style "fg=$dark_purple bg=$white"
set-window-option -g window-status-current-format "#[bold italics] #I: #W #F "
# for some unknown reason this tmux section is being set to reverse from
# somewhere so we explictly remove it here
set-window-option -g window-status-style "fg=$dark_gray dim"
set-window-option -g window-status-format "#[none] #I: #{=20:window_name} "
set-window-option -g window-status-separator ""
# Set window notifications
set-option -g monitor-activity on
set-option -g visual-activity off