-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
87 lines (66 loc) · 2.9 KB
/
tmux.conf
File metadata and controls
87 lines (66 loc) · 2.9 KB
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
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
set-option -g default-shell /bin/zsh
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# map Ctrl+Shift+L to Ctrl+L to allow clearing a pane
bind C-l send-keys C-l
# Smart pane switching with awareness of Vim splits.
# # See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
# bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Scrollback limit of 50000
set-option -g history-limit 50000
# Enable mouse support
set -g mouse on
# disallow renaming window
set -g allow-rename off
set -g status-style bg=colour241,fg=white
# set -g status-fg white
setw -g window-status-current-style bg=cyan
setw -g window-status-style bg=colour248
setw -g window-status-current-format ' #I:#W '
setw -g window-status-format ' #I:#W '
set -g pane-border-style fg=colour252
set -g pane-active-border-style fg=cyan
set -g pane-border-lines heavy
# Status info - not displaying session name
setw -g status-left " "
# Enable vi mode - allow copying text. Use prefix + [ to enter copy mode,
# start selection with Space, exit with Enter, then paste with prefix + ]
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
# Hit 'y' in copy mode to copy to system clipboard
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'
# Avoid printing garbage characters to the screen on copy
set -g set-clipboard off
# Reduce timeout when pressing Esc
set -sg escape-time 0
set -g status-interval 1
set -g status-right-length 100
# set -g status-right '#[]#(tmux-mem-cpu-load )(/usr/bin/tmux-cpu --format "#[bg=colour248] :load [#[fg=:color]:spark#[fg=default]] :percent #[default]") #T '
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_bg 'magenta'
set -g status-right '#{prefix_highlight} #[bg=colour248] #(tmux-mem-cpu-load --interval 2) #[bg=default] #T '
# set -g default-terminal "screen-256color"
set -g default-terminal "xterm-kitty"
# TrueColor support
set-option -ga terminal-overrides ",*256col*:Tc"
# Fix for NVIM_TUI_ENABLE_CURSOR_SHAPE
# set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[2 q'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# set -g @plugin 'thewtex/tmux-mem-cpu-load'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tomskopek/tmux-maximize-vertically'
set -g @continuum-restore 'on'
run '~/.tmux/plugins/tpm/tpm'