nnn/misc/clipboard-copier/copier

24 lines
414 B
Text
Raw Normal View History

#!/usr/bin/env sh
2017-10-10 20:29:48 +05:30
2019-01-05 10:57:11 +05:30
# Description: Copy selection to clipboard
#
# Shell: POSIX compliant
2019-01-05 10:57:11 +05:30
# Author: Arun Prakash Jana
2019-06-20 19:10:47 +05:30
SELECTION=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
2019-04-21 23:59:51 +05:30
2018-12-01 21:42:51 +05:30
# Linux
2019-11-21 00:31:39 +05:30
xargs -0 < "$SELECTION" | xsel -bi
2018-12-01 21:42:51 +05:30
# macOS
2019-11-21 00:31:39 +05:30
# xargs -0 < "$SELECTION" | pbcopy
2018-11-30 06:19:19 +05:30
# Termux
2019-11-21 00:31:39 +05:30
# xargs -0 < "$SELECTION" | termux-clipboard-set
2018-12-01 21:42:51 +05:30
# Cygwin
2019-11-21 00:31:39 +05:30
# xargs -0 < "$SELECTION" | clip
2019-11-05 02:45:03 +05:30
# Wayland
2019-11-21 00:31:39 +05:30
# xargs -0 < "$SELECTION" | wl-copy