mirror of
https://github.com/fscotto/infra.git
synced 2026-07-29 16:20:01 +00:00
27 lines
475 B
Bash
Executable File
27 lines
475 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
if command -v wl-copy >/dev/null 2>&1 && [ -n "${WAYLAND_DISPLAY:-}" ]; then
|
|
exec wl-copy
|
|
fi
|
|
|
|
if command -v xclip >/dev/null 2>&1 && [ -n "${DISPLAY:-}" ]; then
|
|
exec xclip -selection clipboard -in
|
|
fi
|
|
|
|
if command -v xsel >/dev/null 2>&1 && [ -n "${DISPLAY:-}" ]; then
|
|
exec xsel --clipboard --input
|
|
fi
|
|
|
|
if command -v clip.exe >/dev/null 2>&1; then
|
|
exec clip.exe
|
|
fi
|
|
|
|
if command -v pbcopy >/dev/null 2>&1; then
|
|
exec pbcopy
|
|
fi
|
|
|
|
cat >/dev/null
|
|
exit 1
|