-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
80 lines (72 loc) · 3.67 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
unbind %
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
bind S setw synchronize-panes
bind < resize-pane -L 5
bind > resize-pane -R 5
bind v resize-pane -D 5
bind ^ resize-pane -U 5
bind , command-prompt "rename-window '%%'"
bind * attach -c "#{pane_current_path}"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
set -g base-index 1
set -g pane-base-index 1
set-option -g display-time 4000
set -s escape-time 0
# pane movement
# bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
# bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
bind-key s choose-session
bind-key P run-shell "tmux list-clients | cut -d: -f1 | xargs -n 1 tmux switch-client -t #S -c"
bind-key F run-shell "tmux list-clients | cut -d: -f2 | cut -d' ' -f 2 | grep -v $(tmux display-message -p '#S') | xargs -n 1 tmux switch-client -t"
bind C-c run "tmux save-buffer - | xclip"
set-option -gas terminal-overrides "*:Tc" # true color support
set-option -gas terminal-overrides "*:RGB" # true color support
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
set-option -g mouse off
set-option -g renumber-windows on
set-option -g history-limit 250000
unbind-key C-b
bind-key C-q send-prefix
set -g prefix C-q
if-shell "uname | grep -q Darwin" "set-option -g default-command \"reattach-to-user-namespace zsh\"" ""
if-shell "uname | grep -qv Darwin" "set-option -g default-command \"zsh\"" ""
set-option -g allow-rename off
set -g default-terminal "alacritty"
set -g set-titles on
set -g set-titles-string "#W"
set -g window-size smallest
# Theme
set -g status-bg "colour8"
set -g status-justify "left"
set -g status-left-length "100"
set -g status "on"
set -g pane-active-border-style fg="colour2"
set -g status-right-length "100"
set -g message-style fg="colour8",bg="colour14"
set -g message-command-style bg="colour14",fg="colour8"
set -g pane-border-style fg="colour3"
set -g status-left "#S hallo"
setw -g window-status-style bg="colour14",bg="colour8"
setw -g window-status-separator ""
setw -g window-status-activity-style bg="colour8",fg="colour11"
set -g status-left "#{prefix_highlight}#[fg=colour8,bg=colour4,nobold,nounderscore,noitalics] #S "
# first is for work laptop, second for the rest
if-shell "hostname | grep -q notebook-jo" "set -g status-right \"#{?pane_synchronized, #[fg=blue]⌨ ,}#[fg=colour2,bg=colour8,nobold,nounderscore,noitalics] #(/home/jo/bin/current-oncall.py /home/jo/.coredata-oncall.json) #[fg=colour8,bg=colour2] %H:%M #[fg=colour3,bg=colour2,nobold,nounderscore,noitalics]#[fg=colour8,bg=blue] #h \"" "set -g status-right \"#{?pane_synchronized, #[fg=blue]⌨ ,}#[fg=colour2,bg=colour8,nobold,nounderscore,noitalics]#[fg=colour8,bg=colour2] %H:%M #[fg=colour3,bg=colour2,nobold,nounderscore,noitalics]#[fg=colour8,bg=blue] #h \""
setw -g window-status-format "#[fg=colour14,bg=colour8] #I:#[fg=colour14,bg=colour8]#W "
setw -g window-status-current-format "#[fg=colour8,bg=colour2,nobold,nounderscore,noitalics]#[fg=colour8,bg=colour2] #I:#[fg=colour8,bg=colour2]#W #[fg=colour2,bg=colour8,nobold,nounderscore,noitalics]"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# Plugin settings
set -g @prefix_highlight_output_prefix ''
set -g @prefix_highlight_output_suffix ''
set -g @prefix_highlight_bg "colour8"
set -g @prefix_highlight_fg "colour4"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'