Unnamed repository; edit this file 'description' to name the repository.
clipboard: Sway builtin provider yank and paste commands
The configuration here is not super intuitive - in order to yank from a clipboard provider we want it to paste the clipboard and in order to paste to the clipboard we want it to yank the contents we pass. This swaps the programs for yank and paste to align with that. Ref #10839
Michael Davis 2024-11-21
parent b855cd0 · commit 467fad5
-rw-r--r--helix-view/src/clipboard.rs40
1 files changed, 20 insertions, 20 deletions
diff --git a/helix-view/src/clipboard.rs b/helix-view/src/clipboard.rs
index cd8a4eeb..5e16461e 100644
--- a/helix-view/src/clipboard.rs
+++ b/helix-view/src/clipboard.rs
@@ -359,44 +359,44 @@ mod external {
command_provider! {
TMUX,
- yank => "tmux", "load-buffer", "-w", "-";
- paste => "tmux", "save-buffer", "-";
+ yank => "tmux", "save-buffer", "-";
+ paste => "tmux", "load-buffer", "-w", "-";
}
command_provider! {
PASTEBOARD,
- yank => "pbcopy";
- paste => "pbpaste";
+ yank => "pbpaste";
+ paste => "pbcopy";
}
command_provider! {
WL_CLIPBOARD,
- yank => "wl-copy", "--type", "text/plain";
- paste => "wl-paste", "--no-newline";
- yank_primary => "wl-copy", "-p", "--type", "text/plain";
- paste_primary => "wl-paste", "-p", "--no-newline";
+ yank => "wl-paste", "--no-newline";
+ paste => "wl-copy", "--type", "text/plain";
+ yank_primary => "wl-paste", "-p", "--no-newline";
+ paste_primary => "wl-copy", "-p", "--type", "text/plain";
}
command_provider! {
XCLIP,
- yank => "xclip", "-i", "-selection", "clipboard";
- paste => "xclip", "-o", "-selection", "clipboard";
- yank_primary => "xclip", "-i";
- paste_primary => "xclip", "-o";
+ yank => "xclip", "-o", "-selection", "clipboard";
+ paste => "xclip", "-i", "-selection", "clipboard";
+ yank_primary => "xclip", "-o";
+ paste_primary => "xclip", "-i";
}
command_provider! {
XSEL,
- yank => "xsel", "-i", "-b";
- paste => "xsel", "-o", "-b";
- yank_primary => "xsel", "-i";
- paste_primary => "xsel", "-o";
+ yank => "xsel", "-o", "-b";
+ paste => "xsel", "-i", "-b";
+ yank_primary => "xsel", "-o";
+ paste_primary => "xsel", "-i";
}
command_provider! {
WIN32,
- yank => "win32yank.exe", "-i", "--crlf";
- paste => "win32yank.exe", "-o", "--lf";
+ yank => "win32yank.exe", "-o", "--lf";
+ paste => "win32yank.exe", "-i", "--crlf";
}
command_provider! {
TERMUX,
- yank => "termux-clipboard-set";
- paste => "termux-clipboard-get";
+ yank => "termux-clipboard-get";
+ paste => "termux-clipboard-set";
}
#[cfg(feature = "term")]