-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
102 lines (75 loc) · 3.57 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
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g base-index 1
setw -g pane-base-index 1
# set -g mouse on
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
set-option -g history-limit 1000
# remap keys
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# switch to last window
# bind-key l last-window
# switching windows
# bind-key -n C-Tab next-window
# bind-key -n C-S-Tab previous-window
# rename window
bind-key r command-prompt -I "#W" "rename-window '%%'"
# new window
bind-key n new-window
# pane splitting
# bind-key v split-window -v
# bind-key b split-window -h
# vim-like movements
set -g @plugin 'tmux-plugins/tmux-pain-control'
# battery indicator
set -g @plugin 'tmux-plugins/tmux-battery'
# online indicator
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @online_icon "✓"
set -g @offline_icon "⨯"
# fix colorschemes e.g. vim
set-option -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# TokyoNight colors for Tmux
set -g mode-style "fg=#7aa2f7,bg=#3b4261"
set -g message-style "fg=#7aa2f7,bg=#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=#1f2335"
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=#1D202F,bg=#7aa2f7,bold] #S #[fg=#7aa2f7,bg=#1f2335,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#1f2335] #{prefix_highlight} #[fg=#3b4261,bg=#1f2335,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261] Online: #{online_status} #[fg=#7aa2f7,bg=#3b4261,nobold,nounderscore,noitalics] Battery: #{battery_percentage} #[fg=#7aa2f7,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261] %Y-%m-%d %H:%M #[fg=#7aa2f7,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#1D202F,bg=#7aa2f7,bold] #h "
setw -g window-status-activity-style "underscore,fg=#a9b1d6,bg=#1f2335"
setw -g window-status-separator ""
setw -g window-status-style "NONE,fg=#a9b1d6,bg=#1f2335"
setw -g window-status-format "#[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics]#[default] #I #W #F #[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=#1f2335,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261,bold] #I #W #F #[fg=#3b4261,bg=#1f2335,nobold,nounderscore,noitalics]"
# undercurl => https://github.com/folke/tokyonight.nvim?tab=readme-ov-file#fix-undercurls-in-tmux
set -g default-terminal "${TERM}"
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
# automatic session saving and restoring
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# set automatic session save interval (in minutes)
set -g @resurrect-save-interval '1'
# restore neovim sessions
set -g @resurrect-strategy-nvim 'session'
# restore Panes
set -g @resurrect-capture-pane-contents 'on'
# restore last saved environment (automatically)
set -g @continuum-restore 'on'
# restore other applications
set -g @resurrect-processes 'gotop htop'
# DONT MOVE!
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'"
run '~/.tmux/plugins/tpm/tpm'