mirror of
https://github.com/Smaug123/nix-dotfiles
synced 2025-10-05 22:48:39 +00:00
Tmux copy-paste (#122)
This commit is contained in:
@@ -14,6 +14,26 @@
|
||||
extraConfig = ''
|
||||
set-option -sa terminal-features ',xterm-256color:RGB'
|
||||
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"
|
||||
''
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user