aboutsummaryrefslogtreecommitdiffstats
path: root/misc/clipboard-copier/copier
blob: 6ac3ba6b2fe28ef8055b44ed0ece0f051f5877ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env sh

# Description: Copy selection to clipboard
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana

SELECTION=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection

# Linux
xargs -0 < "$SELECTION" | xsel -bi

# macOS
# xargs -0 < "$SELECTION" | pbcopy

# Termux
# xargs -0 < "$SELECTION" | termux-clipboard-set

# Cygwin
# xargs -0 < "$SELECTION" | clip

# Wayland
# xargs -0 < "$SELECTION" | wl-copy