/
tmux.conf
135 lines (110 loc) · 4.32 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
# TODO:
# 1. custom plugin, which reindexes the pane name/window name based on the kubernetes entities and shows the current kubeconfig on the status line.
# general settings
set -g default-terminal "screen-256color"
set-option -sa terminal-overrides ',256:RGB'
set -g status on
set-window-option -g automatic-rename on
set-window-option -g mode-keys vi
set-option -g set-titles on
set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
setw -g mode-keys vi
# remove default bindings to avoid collisions with custom bindings
unbind [
unbind ]
unbind space
unbind enter
unbind C-b
unbind p
# the ultimate prefix
set -g prefix `
bind ` send-prefix
# show time
# bind c clock-mode
# synchronize send-keys to multiple panes in a window
bind t set-window-option synchronize-panes
# clipboard settings with vi mode
bind p paste-buffer
bind -Tcopy-mode-vi 'v' send -X begin-selection
bind -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel "pbcopy"
bind Escape copy-mode
# panes and nav within window
bind v split-window -h
bind s split-window -v
bind J resize-pane -D 5
bind K resize-pane -U 5
bind H resize-pane -L 5
bind L resize-pane -R 5
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# split cur pane to full width horizontally or vertically (makes a new split- to zoom full width, swap the cur pane with the split pane and kill the parent pane.)
# bind "_" split-window -fh -c "#{pane_current_path}"
# bind "|" split-window -fv -c "#{pane_current_path}"
bind n command-prompt -p "join pane from:" "join-pane -s '%%'"
bind m command-prompt -p "send pane to:" "join-pane -t '%%'"
# reindex windows
bind N movew -r
# escape time to determine sequences
set -sg escape-time 0
# Edit source zshrc, tmux, vimrc
bind r source-file ~/.tmux.conf
bind Z split-window -h "nvim ~/.zshrc"
bind T split-window -h "nvim ~/.tmux.conf"
bind V split-window -h "nvim ~/.vimrc"
bind S send-keys 'source ~/.zshrc' Enter
# Window and Pane count starts from 1.
set -g base-index 1
set -g pane-base-index 1
# Initialize TMUX plugin manager (keep this line at the very bottom of
# tmux.conf)
# run '~/.tmux/plugins/tpm/tpm'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tardunge/tmux-themepack'
# set -g @plugin 'robhurring/tmux-spotify'
# set -g @plugin 'samoshkin/tmux-plugin-sysstat'
# set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'sainnhe/tmux-fzf'
# set -g @plugin 'tardunge/tmux-network-bandwidth'
set -g @plugin 'tardunge/tmux-prefix-highlight'
set-option -g @kmux-kcontext-icon "⎈"
set-option -g @kmux-kpod-exec-icon ""
set-option -g @kmux-kpod-log-icon ""
set-option -g @kmux-kpod-port-fw-icon ""
# set -g @plugin "tardunge/nord-tmux"
set -g @plugin "tardunge/kmux-status"
# Icons for statusline
set -g @spotify_playing_icon "ﱘ"
set -g @spotify_paused_icon ""
set -g @spotify_stopped_icon "ﱙ"
#
set-option -g @prefix_highlight_show_copy_mode 'on'
set-option -g @prefix_highlight_show_sync_mode 'on'
#
set-option -g @prefix_highlight_empty_prompt ' '
set-option -g @prefix_highlight_copy_prompt ' '
set-option -g @prefix_highlight_sync_prompt ' '
set-option -g @prefix_highlight_fg 'white'
set-option -g @prefix_highlight_bg '#{@powerline-color-black-2}'
set-option -g @prefix_highlight_empty_attr 'fg=white,bg=#{@powerline-color-black-2}'
set-option -g @prefix_highlight_copy_mode_attr 'fg=white,bg=#{@powerline-color-black-2},bold'
set-option -g @prefix_highlight_sync_mode_attr 'fg=white,bg=#{@powerline-color-black-2},bold'
#
# set-option -g @tmux-network-bandwidth-padding 9
#
# # tmux-themepack configuration
set-option -g @themepack-status-left-area-middle-format "#{prefix_highlight}"
# set-option -g @themepack-status-left-area-middle-format "TARDUNGE"
# set-option -g @themepack-status-left-area-middle-suffix " ﳞ ﲤ 靈 "
# set-option -g @themepack-status-right-area-left-format "#{spotify_status} #{spotify_artist} #{spotify_track}"
set-option -g @themepack-status-right-area-left-format "#{kpod}"
set-option -g @themepack-status-right-area-middle-format "#{kcontext}"
set-option -g @themepack-status-right-area-right-format " tardunge"
set-option -g @themepack 'powerline/block/cyan'
# I-optionnitialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'