diff options
Diffstat (limited to 'misc/clipboard-copier/copier')
-rwxr-xr-x | misc/clipboard-copier/copier | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/misc/clipboard-copier/copier b/misc/clipboard-copier/copier new file mode 100755 index 0000000..e20dcf4 --- /dev/null +++ b/misc/clipboard-copier/copier @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +# Description: Copy selection to clipboard +# +# Shell: POSIX compliant +# Author: Arun Prakash Jana + +SELECTION=~/.config/nnn/.selection + +# Linux +cat "$SELECTION" | xargs -0 | xsel -bi + +# macOS +# cat "$SELECTION" | xargs -0 | pbcopy + +# Termux +# cat "$SELECTION" | xargs -0 | termux-clipboard-set + +# Cygwin +# cat "$SELECTION" | xargs -0 | clip |