This repository has been archived by the owner on Mar 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.tmux.conf
executable file
·143 lines (128 loc) · 4.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
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
# GENERAL
###############################################################
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set -g escape-time 0
set -g focus-events on
set -g history-limit 100000
set -g history-file ~/.tmux/log/tmuxhistory
set -g monitor-activity off
set -g visual-activity off
setw -g monitor-bell off
set -g bell-action none
set -g set-clipboard on
setw -g mode-keys vi
setw -g wrap-search off
###############################################################
# TMUX INTERFACE
###############################################################
# STATUS
set -g status-position bottom
set -g status on
set -g status-interval 5
set -g status-style "fg=brightwhite, bg=black"
## Left
set -g status-left-length 40
set -g status-left "#[fg=black,bg=yellow, bold] #(whoami) #[fg=brightwhite, bg=black] "
## Center
set -g window-status-format " #[fg=black,bg=brightblack] #I #W "
set -g window-status-current-format " #[fg=black,bg=yellow, bold] #I #W "
set -g window-status-separator "#[fg=brightwhite,bg=brightblack]"
set -g status-justify centre
## Right
set -g status-right-length 40
set -g status-right "#[fg=black,bg=yellow, bold] #(lsb_release -d | cut -f 2) "
# PANEL
set -g pane-border-status top
set -g pane-border-style "fg=#252525, bg=#252525"
set -ag pane-active-border-style "fg=black, bg=black, bold"
set -g pane-border-format "#[fg=black,bg=yellow] #{pane_current_command} "
set -g pane-base-index 1
set -g main-pane-width 1
set -g main-pane-height 1
set -g other-pane-width 1
set -g other-pane-height 1
# WINDOW
set -g base-index 1
set -g renumber-windows on
setw -g automatic-rename on
setw -g window-style "fg=#7c6f64 bg=#252525"
setw -g window-active-style "fg=brightwhite bg=black"
# OTHER'Slt
set -g set-titles on
set -g set-titles-string "#{pane_current_command}"
setw -g allow-rename on
setw -g mode-style "fg=black, bg=brightblack"
## Clock mode
set -g clock-mode-colour white
set -g clock-mode-style 12
## Message
set -g message-style "fg=black, bg=yellow"
###############################################################
# KEY BINDING
###############################################################
# KEYBOARD
## Unbind default prefix key
unbind-key C-b
unbind-key C-z
## Bind Prefix
set -g prefix C-a
bind-key C-a send-prefix
## Reload configuration
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
## Window
unbind-key p
unbind-key n
bind-key -n M-n new-window
bind-key -n M-q kill-window
bind-key -n M-Left previous-window
bind-key -n M-Right next-window
## Reorder tmux windows
bind-key -n M-S-Left swap-window -t -1
bind-key -n M-S-Right swap-window -t +1
## Split panel with same directory
unbind-key '"'
unbind-key %
bind-key h split-window -h -c "#{pane_current_path}"
bind-key v split-window -v -c "#{pane_current_path}"
## Switch panel
bind-key -n S-Left select-pane -L
bind-key -n S-Right select-pane -R
bind-key -n S-Up select-pane -U
bind-key -n S-Down select-pane -D
## Swap panel
# unbind-key {
# unbind-key }
bind-key -n M-Up swap-pane -U
bind-key -n M-Down swap-pane -D
## Resize panel
bind-key Left resize-pane -L 2
bind-key Right resize-pane -R 2
bind-key Down resize-pane -D 1
bind-key Up resize-pane -U 1
## pane movement
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
# MOUSE
set -g mouse on
# bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"
# bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
###############################################################
# Tmux Plugin Manager
###############################################################
# 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-yank'
# Plugin Configuration
# tmux-resurrect
set -g @resurrect-processes ':all:'
# tmux-yank
set -g @shell_mode 'vi'
set -g @yank_with_mouse on
set -g @yank_selection_mouse 'clipboard'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
###############################################################