aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tmux/.config/tmux/tmux.conf
blob: 40db3b55d48e773fb5f5e7dad6787bfaee6c0076 (plain)
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
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",alacritty:Tc"
set -ga terminal-overrides ',*:Smulx=\E[4::%p1%dm'  # undercurl support
set -ga terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'  # underscore colours - needs tmux-3.0

set -g mouse on
set -g prefix C-a

set -g base-index 1
set -g pane-base-index 1

set -g detach-on-destroy off
set -g lock-after-time 300
set -g lock-command "tmux clock-mode"

bind-key -N "Open new window" t new-window
bind-key -N "Show a clock" T clock-mode
bind-key -N "Open project in new session" f run-shell ~/.local/bin/tmux-sessionizer
bind-key -N "Switch between sessions" F run-shell ~/.local/bin/tmux-sessions
bind-key -N "Open neovim" e new-window -Sn nvim nvim 
bind-key -N "Open spotify in popup" s display-popup -w 90% -h 90% -E spt
bind-key -N "Open spotify in new window" S new-window -S spt
bind-key -N "Open spotify in popup" g display-popup -w 90% -h 90% -E lazygit
bind-key -N "Open lazygit in new window" G new-window -S lazygit

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'lawabidingcactus/tmux-gruvbox-truecolor'

set -g @resrrect-dir "$XDG_DATA_DIR/tmux/resurrect"
set -g @resurrect-strategy-nvim 'session'

if "test ! -d $XDG_CONFIG_HOME/tmux/plugins/tpm" \
  "run 'git clone https://github.com/tmux-plugins/tpm $XDG_CONFIG_HOME/tmux/plugins/tpm && $XDG_CONFIG_HOME/tmux/plugins/tpm/bin/install_plugins'"

run '$XDG_CONFIG_HOME/tmux/plugins/tpm/tpm'