-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
153 lines (123 loc) · 5.2 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
151
152
153
set -g default-terminal "screen-256color"
set-option -g history-limit 50000
unbind C-b
set -g prefix C-a
bind C-a send-prefix
setw -g mode-keys vi
set-window-option -g xterm-keys on
set -s escape-time 0
# I really like switching panes.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind C-h select-pane -L
bind C-j select-pane -D
bind C-k select-pane -U
bind C-l select-pane -R
# bind -n C-h select-pane -L
# bind -n C-j select-pane -D
# bind -n C-k select-pane -U
# bind -n C-l select-pane -R
# Set the status bar off.
set -g status off
# Toggle the status bar with Ctrl+F3 Combo
bind-key -n C-F3 set-option -g status
bind -n M-k copy-mode
bind -T copy-mode-vi M-k send-keys -X scroll-up
bind -T copy-mode-vi M-j send-keys -X scroll-down
# START: Enable off switch for nested sessions
bind -T root F10 \
set prefix None \;\
set key-table off \;\
# set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\
# set window-status-current-format "#[fg=$color_window_off_status_bg,bg=$color_window_off_status_current_bg]$separator_powerline_right#[default] #I:#W# #[fg=$color_window_off_status_current_bg,bg=$color_window_off_status_bg]$separator_powerline_right#[default]" \;\
# set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\
bind -T off F10 \
set -u prefix \;\
set -u key-table \;\
# set -u status-style \;\
# set -u window-status-current-style \;\
# set -u window-status-current-format \;\
refresh-client -S
# wg_is_keys_off="#[fg=$color_light,bg=$color_window_off_indicator]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[default]"
# set -g status-right "$wg_is_keys_off #{sysstat_cpu} | #{sysstat_mem} | #{sysstat_loadavg} | $wg_user_host"
# END: Enable off switch for nested sessions
# bind -n WheelUpPane copy-mode
# bind -n WheelDownPane copy-mode
# bind -n M-Up copy-mode
# bind -T copy-mode-vi M-j send-keys -X scroll-up
# bind -T copy-mode-vi M-k send-keys -X scroll-down
# bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 2 scroll-up
# bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 2 scroll-down
# set-option -g mouse on
# make scrolling with wheels work
# bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
# bind -n WheelDownPane select-pane -t= \; send-keys -M
# bind-key -n Escape copy-mode
# set -g mouse on
# Sane scrolling
# set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
# bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
# set mouse-utf8 off
# set -g mode-mouse on
#
# unbind +
# bind + \
# new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
# swap-pane -s tmux-zoom.0 \;\
# select-window -t tmux-zoom
# unbind -
# bind - \
# last-window \;\
# swap-pane -s tmux-zoom.0 \;\
# kill-window -t tmux-zoom
# set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
# 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 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @plugin 'jbnicolai/tmux-fpp'
set -g @plugin 'tmux-plugins/tmux-sessionist'
# set -g @plugin 'jimeh/tmux-themepack'
# set -g @plugin 'seebi/tmux-colors-solarized'
# set -g @plugin 'arcticicestudio/nord-tmux'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# set -g @nord_tmux_no_patched_font "1"
# set -g @nord_tmux_show_status_content "0"
# set -g @colors-solarized 'base16'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
set -g @sidebar-tree-command 'tree -C'
# set -g @sidebar-tree-pager 'view -'
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
# -fg and -bg are probably removed, use -style instaead
# set -g pane-border-fg magenta
# set -g pane-active-border-fg green
# set -g pane-active-border-bg default
# setw -g pane-border-status top
# setw -g pane-border-format '─'
# setw -g pane-border-fg colour8
# set -g pane-active-border-style fg=colour8
# set -g pane-active-border-style bg=default
#
# sed -n '/^» '$(...)'\s*$/,/^»/p' file | head -n -3 | tail -n +2 | xclip
# grep » file | sed 's/»//; /^\s*$/d' | fzf
# tmux capture-pane -p -J -S - > file
# bind " split-window -c "#{pane_current_path}""
bind '%' split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically
bind c new-window -c '#{pane_current_path}' # Create new window'"'
set -g set-titles on
bind-key ! break-pane -d -n _hidden_pane
bind-key @ join-pane -s $.1