diff --git a/nix/homeModules/common/tmux/tmux.conf b/nix/homeModules/common/tmux/tmux.conf index 2de98a16..33bdd1f6 100644 --- a/nix/homeModules/common/tmux/tmux.conf +++ b/nix/homeModules/common/tmux/tmux.conf @@ -103,5 +103,10 @@ bind -T off F12 \ refresh-client -S # Better copy +# -X flag prevents tmux leaving selection mode, which is jumpy and annoying bind v copy-mode bind -T copy-mode-vi v send-keys -X begin-selection +bind -T copy-mode-vi enter send-keys -X copy-selection +bind -T copy-mode-vi MouseDown1Pane select-pane \; send-keys -X clear-selection +bind -T copy-mode-vi MouseDrag1Pane select-pane \; send-keys -X begin-selection +unbind -T copy-mode-vi MouseDragEnd1Pane diff --git a/nix/homeModules/extra/tmux-fish-integration.nix b/nix/homeModules/extra/tmux-fish-integration.nix index 4480f567..74a6859a 100644 --- a/nix/homeModules/extra/tmux-fish-integration.nix +++ b/nix/homeModules/extra/tmux-fish-integration.nix @@ -29,6 +29,7 @@ programs.tmux.extraConfig = lib.mkBefore '' # sessionizer binds bind -n C-f run-shell "tmux new-window tmux-sessionizer" + bind -T copy-mode-vi C-f run-shell "tmux new-window tmux-sessionizer" ''; home.packages = with pkgs; [