-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
executable file
·110 lines (87 loc) · 2.94 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
set-option -g default-shell /bin/zsh
setw -g aggressive-resize on
set -sa terminal-overrides ",xterm*:Tc"
set-option -sg escape-time 10
set-option -g default-terminal "screen-256color-bce"
# = KEYS ===================================================
# Remap leader key
unbind C-b
if-shell '[[ $(uname -s) = Darwin ]]' {
set-option -g prefix §
} {
set-option -g prefix `
}
bind ` send-prefix
# Reload tmux config
bind r source-file ${HOME}/.tmux.conf
setw -g mode-keys vi
# vifm shortcut
unbind e
bind e new-window -n "Files" "vifm"
# Switch to last session
bind Tab switch-client -l
unbind M-t
unbind M-T
bind -n M-t set -g window-active-style bg=colour235
bind -n M-T set -g window-active-style bg=default
# = WINDOW =================================================
# Start window at 1 since 0 is too far away
set -g base-index 1
setw -g pane-base-index 1
# Start window on current path
bind c new-window -c '#{pane_current_path}'
# Vim style window selection
bind -n M-h prev
bind -n M-H prev
bind -n M-l next
bind -n M-L next
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
set -g status-right '#[fg=red,bg=blue] #(tmux.powavail)#(tmux.batt)%% #[fg=yellow]%a %Y-%m-%d %H%M'
set-option -g monitor-activity on
# = PANE ===================================================
# Split panes using | and -
bind \\ split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
unbind '"'
unbind %
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# prefix + x kills window, prefix + Alt x kills pane
unbind x
bind x kill-window
unbind M-x
bind M-x kill-pane
# = MISC ===================================================
# Enable mouse scrolling
setw -g mouse on
# = PLUGINS ================================================
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'dracula/tmux'
set -g @dracula-show-weather false
set -g @dracula-show-fahrenheit false
set -g @dracula-cpu-usage true
set -g @dracula-ram-usage true
set -g @dracula-military-time true
set -g @dracula-show-left-icon session
set -g @dracula-show-timezone false
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @resurrect-dir ${XDG_CONFIG_HOME}/tmux/plugins/resurrect
run-shell ${XDG_CONFIG_HOME}/tmux/plugins/tmux-continuum/continuum.tmux
run-shell ${XDG_CONFIG_HOME}/tmux/plugins/tmux-yank/yank.tmux
# = REMOTE SESSIONS ========================================
if-shell 'test -n "$SSH_CLIENT"' \
'source-file ${XDG_CONFIG_HOME}/tmux/tmux.remote.conf'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# ==========================================================
run -b ${XDG_CONFIG_HOME}/tmux/plugins/tpm/tpm