home/tmux: don't use hm module

This commit is contained in:
Guanran Wang 2024-07-21 11:55:03 +08:00
parent 7be816cc69
commit 8a1731ff35
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF

View file

@ -1,21 +1,30 @@
{
programs.tmux = {
enable = true;
{pkgs, ...}: {
home.packages = [pkgs.tmux];
# value from tmux-sensible, but got overridden by HM (?)
aggressiveResize = true;
escapeTime = 0;
historyLimit = 50000;
xdg.configFile."tmux/tmux.conf".text = ''
run-shell ${pkgs.tmuxPlugins.sensible.rtp}
baseIndex = 1;
customPaneNavigationAndResize = true;
keyMode = "vi";
mouse = true;
newSession = true;
terminal = "tmux-256color";
extraConfig = ''
set -g set-clipboard on
set -g renumber-windows on
set-option -s default-terminal "tmux-256color"
set-option -g base-index 1
set-option -w -g pane-base-index 1
set-option -g renumber-windows on
set-option -g status-keys vi
set-option -w -g mode-keys vi
set-option -g mouse on
set-option -s set-clipboard on
set-option -w -g aggressive-resize on
bind-key -N "Select pane to the left of the active pane" h select-pane -L
bind-key -N "Select pane below the active pane" j select-pane -D
bind-key -N "Select pane above the active pane" k select-pane -U
bind-key -N "Select pane to the right of the active pane" l select-pane -R
bind-key -r -N "Resize the pane left by 5" H resize-pane -L 5
bind-key -r -N "Resize the pane down by 5" J resize-pane -D 5
bind-key -r -N "Resize the pane up by 5" K resize-pane -U 5
bind-key -r -N "Resize the pane right by 5" L resize-pane -R 5
new-session
'';
};
}