-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
111 lines (95 loc) · 4.78 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
# vim: fdm=marker:fdl=1:nowrap
set-environment -g PATH "/usr/bin:/opt/homebrew/bin:$HOME/.files/scripts/tmux/"
set -g status-keys emacs
set-window-option -g mode-keys vi
set -g bell-action none
set -g focus-events on
set -g visual-activity on
set -g monitor-activity on
set -g history-limit 50000
set -g default-terminal "tmux-256color"
set -g default-terminal "tmux-256color"
# set -as terminal-features ",alacritty*:RGB"
# set -sa terminal-overrides ',xterm-256color:RGB'
set -ga terminal-overrides ",*256col*:Tc"
# set -ga terminal-overrides ",alacritty:Tc"
set -g mouse on
unbind -n MouseDrag1Pane
unbind -Tcopy-mode MouseDrag1Pane
# keymaps {{{
set -g prefix2 C-f
bind f send-prefix
bind b send-prefix
bind | split-window -h # split panes horizontally `"`
bind - split-window -v # split panes vertically `%`
bind Tab next-window # cycle through windows
bind i set status # toggle status bar
bind \\ set-window-option synchronize-panes\; display-message "\
synchronize-panes = #{?pane_synchronized,on,off}"
bind -n S-Up resize-pane -U 10
bind -n S-Down resize-pane -D 10
bind -n S-Left resize-pane -L 10
bind -n S-Right resize-pane -R 10
bind-key r run-shell " \
tmux source-file ~/.tmux.conf > /dev/null; \
tmux display-message 'sourced ~/.tmux.conf!'"
# }}}
# status bar {{{
# https://github.com/folke/tokyonight.nvim/blob/main/extras/tmux/tokyonight_night.tmux
# ~/.local/share/nvim/lazy/tokyonight.nvim/extras/tmux/tokyonight_night.tmux
set -g status-interval 1
set -g mode-style "bg=#7aa2f7,fg=#3b4261"
set -g message-style "bg=#7aa2f7,fg=#3b4261"
set -g message-command-style "fg=#7aa2f7,bg=#3b4261"
set -g pane-border-style "fg=#3b4261"
set -g pane-active-border-style "fg=#7aa2f7"
set -g status "on"
set -g status-justify "left"
set -g status-style "fg=#7aa2f7,bg=default"
set -g status-left-length "100"
set -g status-right-length "100"
set -g status-left-style NONE
set -g status-right-style NONE
set -g status-left ""
set -ga status-left "#{?#{==:#{server_sessions},1},,#[fg=#15161e,bg=#7aa2f7,bold] Sesh:#S }"
set -ga status-left "#{?#{==:#{session_windows},1},,#[fg=#15161e,bg=#7aa2f7,bold] Win:#I }"
set -ga status-left "#{?#{==:#{window_panes},1},,#[fg=#15161e,bg=#7aa2f7,bold] Pane:#P }"
set -ga status-left "#[fg=#7aa2f7,bg=#3b4261,nobold,nounderscore,noitalics] "
set -ga status-left "#[fg=#7aa2f7,bg=#3b4261,bold]👾 #{pane_current_command} "
set -ga status-left "#[fg=#7aa2f7,bg=#3b4261,bold]📂 #{pane_current_path}"
# set -ga status-left "#{?#{==:#{window_index},0},#[fg=#3b4261,bg=#3b4261,nobold,nounderscore,noitalics] ,#[fg=#3b4261,bg=default,nobold,nounderscore,noitalics]} "
setw -g window-status-separator ""
setw -g window-status-style "NONE,fg=#a9b1d6,bg=default"
setw -g window-status-format "#[fg=#a9b1d6,bg=default] #I:#P:#W [#F]"
setw -g window-status-activity-style "underscore,fg=#e0af68,bg=default"
# setw -g window-status-current-style "bold,fg=default,bg=#3b4261"
# setw -g window-status-current-format "#[fg=#FFFFFF,bg=#3b4261,bold] #I:#P:#W [#F] #[fg=#3b4261,bg=default,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=#FFFFFF,bg=#3b4261,bold] [#F] #[fg=#3b4261,bg=default,nobold,nounderscore,noitalics]"
setw -g window-status-last-style "bold,fg=#f7768e,bg=default"
set -g status-right ""
# set -ga status-right "#[fg=#3b4261,bg=default,nobold,nounderscore,noitalics]"
# set -ga status-right "#[fg=#7aa2f7,bg=#3b4261] 💻 #(tmux-mem-cpu-load.sh) #(tmux-battery) "
set -ga status-right "#[fg=#FFFFFF,bg=default] 💻 #(tmux-mem-cpu-load) "
set -ga status-right "#[fg=#3b4261,bg=default,nobold,nounderscore,noitalics]"
# ~/.tmux/bin/tmux-battery.sh
set -ga status-right "#[fg=#7aa2f7,bg=#3b4261] #(tmux-battery.sh) "
set -ga status-right "#[fg=#16161e,bg=#default,nobold,nounderscore,noitalics]"
set -ga status-right "#[fg=#15161e,bg=#7aa2f7,bold] %U 🗓️ %a ⏱️ %s \ "
# tmux-plugins/tmux-prefix-highlight suppor\t
# set -g @prefix_highlight_output_prefix "#[fg=#e0af68]#[bg=#16161e]#[fg=#16161e]#[bg=#e0af68]"
# set -g @prefix_highlight_output_suffix ""
# }}}
# fix copy-paste on mac {{{
if-shell "uname | grep -q Darwin" {
#set -g default-command "reattach-to-user-namespace -l $SHELL"
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
#bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
#bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
}
# }}}
set -s escape-time 69
# set -g @plugin 'erikw/tmux-powerline'
# set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'