aboutsummaryrefslogtreecommitdiffstats
path: root/misc/clipboard-copier/copier
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-06-16 22:21:13 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-06-17 07:04:42 +0530
commit794a0e27091b63f997fc829d0288cde5a4a2edbd (patch)
tree384695218b8cf09700df81715627004124e0edf7 /misc/clipboard-copier/copier
parentaa56b99326a12f5bbab6d5a693755060e81e44a2 (diff)
downloadnnn-794a0e27091b63f997fc829d0288cde5a4a2edbd.tar.gz
Move scripts to misc
Diffstat (limited to 'misc/clipboard-copier/copier')
-rwxr-xr-xmisc/clipboard-copier/copier20
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