-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
92 lines (68 loc) · 2.28 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
set -g base-index 1
set -g pane-base-index 1
set-option -g allow-rename off
# True colors mode
# Add truecolor support
set-option -ga terminal-overrides ",*:Tc"
# Default terminal is 256 colors
set -g default-terminal "screen-256color"
# Statusbar has white on black/transparent background
set -g status-bg default
set -g status-fg default
set -g @online_icon "ON"
set -g @offline_icon "OFF"
set -g status-right-length 65
set -g status-left-length 15
set -g status-right " Online: #{online_status} | Battery: #{battery_percentage} | %H:%M %a %d-%b-%Y "
setw -g window-status-format " #I #W "
setw -g window-status-current-format " #I #W "
setw -g window-status-current-style fg=black,bg=colour48
# Remap prefix to C-a
set -g prefix C-a
bind C-a send-prefix
unbind C-b
# Quick reload
bind r source-file ~/.tmux.conf
# Keymap
bind \\ split-window -h -c '#{pane_current_path}'
bind \/ split-window -v -c '#{pane_current_path}'
unbind '"'
unbind %
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind J resize-pane -D 10
bind K resize-pane -U 10
bind L resize-pane -L 10
bind H resize-pane -R 10
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe "reattach-to-user-namespace pbcopy"
set -g default-shell $SHELL
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
# Setting for vim
set-option -sg escape-time 10
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-online-status'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Undercurl
set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides
',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
# underscore colours - needs tmux-3.0:
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# Config Mouse mode
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
run '~/.tmux/plugins/tpm/tpm'