diff --git a/home/programs/tmux.nix b/home/programs/tmux.nix index 5067472..52b2ef8 100644 --- a/home/programs/tmux.nix +++ b/home/programs/tmux.nix @@ -4,38 +4,46 @@ programs.tmux = { enable = true; extraConfig = '' - set-window-option -g mode-keys vi unbind C-b + unbind '"' + unbind % + unbind [ + unbind s + set -g prefix C-a bind C-a send-prefix + set-window-option -g mode-keys vi set -g allow-passthrough on set -s set-clipboard on set -g @resurrect-strategy-nvim 'session' + set -sg escape-time 10 - bind h select-pane -L - bind j select-pane -D - bind k select-pane -U - bind l select-pane -R + bind -n M-h select-pane -L + bind -n M-j select-pane -D + bind -n M-k select-pane -U + bind -n M-l select-pane -R - unbind '"' - unbind % - bind | split-window -h - bind - split-window -v + bind -n M-H resize-pane -L 2 + bind -n M-J resize-pane -D 2 + bind -n M-K resize-pane -U 2 + bind -n M-L resize-pane -R 2 - bind -r H resize-pane -L 5 - bind -r J resize-pane -D 5 - bind -r K resize-pane -U 5 - bind -r L resize-pane -R 5 + bind -n 'M-\' split-window -h -c "#{pane_current_path}" + bind -n M-- split-window -v -c "#{pane_current_path}" - unbind [ - unbind s - bind s copy-mode + bind -n M-s copy-mode ''; plugins = with pkgs.tmuxPlugins; [ - continuum resurrect + { + plugin = continuum; + extraConfig = '' + set -g @continuum-restore "on" + set -g @continuum-save-interval "5" + ''; + } ]; }; }