chore(tmux): update configuration

This commit is contained in:
Yorick Barbanneau 2025-05-07 01:38:32 +02:00
parent 3f349f7230
commit 72f0ec1c2c
2 changed files with 43 additions and 19 deletions

View file

@ -45,7 +45,21 @@ in
bind -n M-n split-window -h -c "#{pane_current_path}"
bind -n M-N split-window -v -c "#{pane_current_path}"
bind -n M-0 run 'create-tmux-session -s config -p nix "run:nvim ." vsplit'
# define sessions with Alt+F{1..4} for general purpose sessions
bind -n M-F1 if 'tmux has-session -t 1' {switch-client -t 1} {display-popup -E -E 'create-tmux-session -i 1'}
bind -n M-F2 if 'tmux has-session -t 2' {switch-client -t 2} {display-popup -E -E 'create-tmux-session -i 2'}
bind -n M-F3 if 'tmux has-session -t 3' {switch-client -t 3} {display-popup -E -E 'create-tmux-session -i 3'}
bind -n M-F4 if 'tmux has-session -t 4' {switch-client -t 4} {display-popup -E -E 'create-tmux-session -i 4'}
# Alt+F10 for launching my Nix project
bind -n M-F10 run 'create-tmux-session -n config -p nix "run:nvim ." vsplit:20'
# change window with Alt+{1..5}
bind -n -N "Goto window 1" M-1 select-window -T -t 1
bind -n -N "Goto window 2" M-2 select-window -T -t 2
bind -n -N "Goto window 3" M-3 select-window -T -t 3
bind -n -N "Goto window 4" M-4 select-window -T -t 4
bind -n -N "Goto window 5" M-5 select-window -T -t 5
# Theme
set -g status-interval 2