-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.tmux.conf
114 lines (83 loc) · 3.75 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
bind r source-file ~/.tmux.conf
# Windows should start at 1
set -g base-index 1
# Rebind tmux key from control-b to control-s
set -g prefix C-s
set -g default-terminal "tmux-256color"
set-option -as terminal-overrides ',xterm*:RGB'
# set-option -sa terminal-overrides ',alacritty:RGB'
accent_color="#cba6f7"
bg1="#45475a"
fg1="#313244"
bg2="#1e1e2e"
fg2="#cdd6f4"
orange="#e78a4e"
bg_light="#b4befe"
# Colors
set -g status-style "bg=default fg=${fg2}"
setw -g window-status-current-style fg=${fg1},bg=${accent_color}
set-option -g status-left-style fg=gray
set -g window-status-format "#[fg=${bg1},bg=${fg1}]#[bold]#[bg=${bg1},fg=${fg2}]#I#[fg=${bg1},bg=${fg1}]#[nobold]#[bg=${fg1},fg=${fg2}] #W "
set -g window-status-current-format "#[bg=${fg1},fg=${accent_color}]#[bold]#[bg=${accent_color},fg=${bg2}]#I#[bg=${fg1},fg=${accent_color}]#[nobold]#[bg=${fg1},fg=${accent_color}] #W "
set -g status-left "#[fg=${bg1}]#[bold]#[bg=${bg1},fg=${accent_color}] #S #[fg=${bg1},bg=${fg1}] "
set -g status-right "#[bg=default,fg=${bg1}]#[bold]#[bg=${bg1},fg=${fg2}] %I:%M %p #[fg=${bg1},bg=default]"
set-window-option -g mode-style "bg=${accent_color} fg=${bg2}"
set-option -g status-justify left
set-option -g status-left-length 100
set-option -g status-right-length 150
set-option -g status-keys vi
# Pane styling
set -g pane-border-style fg=#45475a,bg=default
set -g pane-active-border-style fg="${accent_color}",bg=default
set -g pane-border-lines heavy
set -g popup-style fg=default,bg=#181825
set -g popup-border-style fg=#1e1e2e,bg=#181825
set -g popup-border-lines heavy
set -g window-style 'bg=default'
set -g window-active-style 'bg=default'
# Separator
set -g window-status-separator ""
# Toggle status
bind -r h set status
# Pomodoro timer
bind -r P new -n "POMODORO" -s "pomodoro" "tmux set window-status-current-style bg=red,fg=black && pomoff && tmux switch-client -l"
# set -g pane-border-style "bg=black fg=black"
# set -g pane-active-border-style "bg=green fg=green"
# tmux sessionizer
bind-key -r t display-popup -w 47% -h 60% -E "~/.config/scripts/my-tmux-sessionizer"
# Neovim recommendations
set-option -sg escape-time 10
set-option -g focus-events on
# Vi mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
unbind p
unbind n
bind-key n next-window
bind-key e previous-window
bind-key n run-shell -b "~/.config/scripts/tmux-window-or-pane right"
bind-key e run-shell -b "~/.config/scripts/tmux-window-or-pane left"
bind c run-shell -b "~/.config/scripts/tmux-new-window"
bind % split-window -h -c "#{pane_current_path}"
bind \" split-window -v -c "#{pane_current_path}"
bind-key i run-shell -b "~/.config/scripts/tmux-pane-tile"
bind N swap-window -d -t +1
bind E swap-window -d -t -1
bind x confirm-before -p "kill window #I? (y/n)" "run-shell -b \"~/.config/scripts/tmux-reorder-windows kill\""
# Undercurl
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
set -as terminal-overrides ",gnome*:Tc"
set -g @plugin 'sainnhe/tmux-fzf'
FZF_DEFAULT_OPTS=" \
--color=bg+:#313244,spinner:#f5e0dc,hl:#f38ba8 \
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8"
TMUX_FZF_OPTIONS="-p -w 100% -h 95% -m"
TMUX_FZF_LAUNCH_KEY="f"
# bind-key "f" run-shell -b "~/.tmux/plugins/tmux-fzf/scripts/session.sh switch"
bind-key "C-r" run-shell -b "~/.tmux/plugins/tmux-fzf/scripts/session.sh switch"
bind-key "r" run-shell -b "~/.tmux/plugins/tmux-fzf/scripts/session.sh switch"
run '~/.tmux/plugins/tpm/tpm'