71 lines
1.6 KiB
Nix
71 lines
1.6 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
programs.tmux = {
|
|
enable = true;
|
|
baseIndex = 1;
|
|
|
|
extraConfig = ''
|
|
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 -sg escape-time 10
|
|
set -g renumber-windows on
|
|
|
|
bind r source-file ~/.config/tmux/tmux.conf \; display "reloaded"
|
|
|
|
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
|
|
|
|
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 -n M-c new-window
|
|
|
|
bind -n 'M-\' split-window -h -c "#{pane_current_path}"
|
|
bind -n M-- split-window -v -c "#{pane_current_path}"
|
|
|
|
bind -n M-1 select-window -t :1
|
|
bind -n M-2 select-window -t :2
|
|
bind -n M-3 select-window -t :3
|
|
bind -n M-4 select-window -t :4
|
|
bind -n M-5 select-window -t :5
|
|
bind -n M-6 select-window -t :6
|
|
bind -n M-7 select-window -t :7
|
|
bind -n M-8 select-window -t :8
|
|
bind -n M-9 select-window -t :9
|
|
|
|
bind -n M-s copy-mode
|
|
'';
|
|
|
|
plugins = with pkgs.tmuxPlugins; [
|
|
{
|
|
plugin = resurrect;
|
|
extraConfig = ''
|
|
set -g @resurrect-strategy-nvim 'session'
|
|
'';
|
|
}
|
|
{
|
|
plugin = continuum;
|
|
extraConfig = ''
|
|
set -g @continuum-restore "on"
|
|
set -g @continuum-save-interval "5"
|
|
'';
|
|
}
|
|
];
|
|
};
|
|
}
|