This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/clip
2020-04-21 16:38:58 -05:00

12 lines
243 B
Bash
Executable file

#!/usr/bin/env sh
# TODO: detect MIME type?
# can a `clip-once` script exist building on this?
# wl-copy `-o`, xclip `-l 1`?
if is_wayland; then
wl-copy -n wl-copy --trim-newline "$@"
else
xclip -i -sel p -f "$@" | xclip -i -sel c "$@"
fi