-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf.local
107 lines (81 loc) · 3.66 KB
/
tmux.conf.local
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
# act like GNU screen
unbind C-b
set -g prefix C-a
# changing default delay
set -sg escape-time 1
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# sane window splitting
unbind %
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
# create window in current directory
bind c new-window -c "#{pane_current_path}"
# sane resizing of panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# to cycle through windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# to cycle through sessions
unbind Right
bind -r Right switch-client -p
unbind Left
bind -r Left switch-client -n
# behave like vim for copy mode
unbind [
bind-key Escape copy-mode
unbind p
bind p paste-buffer
# copy paste
bind-key -Tcopy-mode-vi 'v' send-keys -X begin-selection
bind-key -Tcopy-mode-vi 'y' send-keys -X copy-pipe-and-cancel pbcopy
# reload tmux.conf
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# start window numbering at 1
set -g base-index 1
# start pane numbering at 1
set-window-option -g pane-base-index 1
# when we really want to hit C-a
bind C-a send-prefix
# set default shell to zsh
set -g default-shell $SHELL
# look good - undercurls etc
# see https://github.com/folke/tokyonight.nvim#fix-undercurls-in-tmux
set -g default-terminal "${TERM}"
set-option -ga terminal-overrides ",${TERM}:Tc"
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
# TokyoNight colors for Tmux
set -g mode-style "fg=#82aaff,bg=#3b4261"
set -g message-style "fg=#82aaff,bg=#3b4261"
set -g message-command-style "fg=#82aaff,bg=#3b4261"
set -g pane-border-style "fg=#3b4261"
set -g pane-active-border-style "fg=#82aaff"
set -g status "on"
set -g status-justify "left"
set -g status-style "fg=#82aaff,bg=#1e2030"
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 "#[fg=#1b1d2b,bg=#82aaff,bold] #S #[fg=#82aaff,bg=#1e2030,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=#1e2030,bg=#1e2030,nobold,nounderscore,noitalics]#[fg=#82aaff,bg=#1e2030] #{prefix_highlight} #[fg=#3b4261,bg=#1e2030,nobold,nounderscore,noitalics]#[fg=#82aaff,bg=#3b4261] %Y-%m-%d %I:%M %p #[fg=#82aaff,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#1b1d2b,bg=#82aaff,bold] #h "
if-shell '[ "$(tmux show-option -gqv "clock-mode-style")" == "24" ]' {
set -g status-right "#[fg=#1e2030,bg=#1e2030,nobold,nounderscore,noitalics]#[fg=#82aaff,bg=#1e2030] #{prefix_highlight} #[fg=#3b4261,bg=#1e2030,nobold,nounderscore,noitalics]#[fg=#82aaff,bg=#3b4261] %Y-%m-%d %H:%M #[fg=#82aaff,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#1b1d2b,bg=#82aaff,bold] #h "
}
setw -g window-status-activity-style "underscore,fg=#828bb8,bg=#1e2030"
setw -g window-status-separator ""
setw -g window-status-style "NONE,fg=#828bb8,bg=#1e2030"
setw -g window-status-format "#[fg=#1e2030,bg=#1e2030,nobold,nounderscore,noitalics]#[default] #I #W #F #[fg=#1e2030,bg=#1e2030,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=#1e2030,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#82aaff,bg=#3b4261,bold] #I #W #F #[fg=#3b4261,bg=#1e2030,nobold,nounderscore,noitalics]"
# tmux-plugins/tmux-prefix-highlight support
set -g @prefix_highlight_output_prefix "#[fg=#ffc777]#[bg=#1e2030]#[fg=#1e2030]#[bg=#ffc777]"
set -g @prefix_highlight_output_suffix ""