home/tmux: improve copy mode

This commit is contained in:
Primrose 2026-02-02 10:59:22 +01:00
parent 5c311bbfdb
commit 9c9f71f7ff
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
2 changed files with 6 additions and 0 deletions

View file

@ -103,5 +103,10 @@ bind -T off F12 \
refresh-client -S refresh-client -S
# Better copy # Better copy
# -X flag prevents tmux leaving selection mode, which is jumpy and annoying
bind v copy-mode bind v copy-mode
bind -T copy-mode-vi v send-keys -X begin-selection 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

View file

@ -29,6 +29,7 @@
programs.tmux.extraConfig = lib.mkBefore '' programs.tmux.extraConfig = lib.mkBefore ''
# sessionizer binds # sessionizer binds
bind -n C-f run-shell "tmux new-window tmux-sessionizer" 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; [ home.packages = with pkgs; [