Tmux copy-paste (#122)

This commit is contained in:
Patrick Stevens
2025-07-16 20:49:53 +01:00
committed by GitHub
parent 544ab65c3b
commit 7ebe1d3347

View File

@@ -14,6 +14,26 @@
extraConfig = '' extraConfig = ''
set-option -sa terminal-features ',xterm-256color:RGB' set-option -sa terminal-features ',xterm-256color:RGB'
set -g default-command "exec ${pkgs.zsh}/bin/zsh" set -g default-command "exec ${pkgs.zsh}/bin/zsh"
# Vi mode
set-window-option -g mode-keys vi
# Use v to begin selection in copy mode
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Use Shift+V to select line
bind-key -T copy-mode-vi V send-keys -X select-line
# Use y to yank to clipboard
${
if pkgs.stdenv.isDarwin
then ''
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
''
else ''
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "${pkgs.wl-clipboard}/bin/wl-copy"
''
}
''; '';
}; };
} }