-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
150 lines (137 loc) · 4.99 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
####################
# General settings #
####################
set -g default-terminal "screen-256color" # colorful terminal
set -s escape-time 10 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout
set -s focus-events on
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
set -g history-limit 5000
setw -q -g utf8 on
setw -g xterm-keys on
set -g prefix2 C-a # GNU-Screen compatible prefix
bind C-a send-prefix -2 # points to previous command, can use C-b and C-a
# Display settings #
set -g base-index 1 # start window numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g display-panes-time 1000 # slightly longer pane indicators display time
set -g display-time 3000 # slightly longer status messages display time
set -g status-interval 10 # redraw status line every ten seconds
set -g monitor-activity off # get notified at the window name
set -g visual-activity off # get notified at the bottom of the screen
setw -g automatic-rename on # rename window to reflect current application
################
# Key bindings #
################
# unbinding keys
unbind d # unbind detach
unbind n # unbind next-window
unbind p # unbind previous-window
unbind m # unbind marked pane
unbind r # unbind redraw of client
# binding keys
bind - split-window -v # split current window horizontally
bind _ split-window -h # split current window vertically
bind r command-prompt "rename-window %%" # rename window
bind w list-windows # display windows
bind C-k confirm-before "kill-pane" # kill
bind L refresh-client # refresh client
bind R source-file ~/.tmux.conf \; display 'Reloaded the configuration' # easy config refresh
bind Enter copy-mode
bind m show-messages
bind P paste-buffer
bind C-c new-session # create session
bind C-f command-prompt -p find-session 'switch-client -t %%' # find session
bind C-d detach # detach
# bind C-K confirm-before "kill-session" # kill
bind -n C-l send-keys C-l \; run 'sleep 0.1' \; clear-history # clear both screen and history
# pane navigation
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
bind > swap-pane -D
bind < swap-pane -U
# pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# window navigation
bind -r C-h previous-window
bind -r C-l next-window
bind Tab last-window
###############################
# Status bar default settings #
###############################
#
#set -g status-bg black
#set -g status-fg white
#
#set -g set-titles on
#set -g set-titles-string '#S.#I.#P #W #T'
#
#set -g set-titles on
#set -g status-justify centre
#set -g pane-border-style fg=white
#set -g pane-active-border-style bg=black,fg=green
#
#set -g window-status-current-style bg=black,fg=green
#set -g automatic-rename off
#set-window-option -g mode-keys vi
#
# Left side status bar
#set -g status-left-length 30
#set -g status-left "#[fg=green][#[fg=white] #(whoami)@#h #[fg=green]]"
#
# Right side status bar
#set -g status-right-length 100
#
# The row below is the "normal" status bar to the right if you don't want to use tpm
# set -g status-right '#[fg=green][ #[fg=white]%H:%M | %y-%m-%d #[fg=green]]'
#
# tpm with CPU information
#set -g status-right '#{prefix_highlight} #[fg=green][ #[fg=white]%H:%M | #{cpu_fg_color}#{cpu_percentage} #[fg=white]| %y-%m-%d #[fg=green]]'
#set -g @prefix_highlight_fg 'fg=colour22'
#set -g @prefix_highlight_bg 'bg=colour148'
#set -g @prefix_highlight_prefix_prompt 'Waiting'
#set -g @prefix_highlight_copy_prompt 'Copying'
#set -g @prefix_highlight_show_copy_mode 'on'
#set -g @prefix_highlight_copy_mode_attr 'fg=black,bg=yellow,bold'
#
# tpm with nerwork information
# set -g status-right '#[fg=green][ #[fg=white]%H:%M | #{net_speed} #[fg=white]| %y-%m-%d #[fg=green]]'
#
############
# Tmuxline #
############
# Check if Tmuxline config exists and source it
if-shell "test -f .tmuxline" "source-file .tmuxline"
set -g @prefix_highlight_fg 'colour22'
set -g @prefix_highlight_bg 'colour148'
set -g @prefix_highlight_prefix_prompt 'Waiting'
set -g @prefix_highlight_copy_prompt 'Copying'
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_copy_mode_attr 'fg=colour22,bg=yellow,bold'
###################
# Plugin settings #
###################
#
# tmux-net-speed settings
#set -g @net_speed_interfaces "eth4"
#
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-net-speed'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
#
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
#
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'