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/common/bin/clip
2023-07-17 11:23:37 -05:00

16 lines
341 B
Bash
Executable file

#!/usr/bin/env bash
# TODO: detect MIME type?
# TODO: figure out how/why these programs "wait" -- can a `clip-once` script exist building on this?
# wl-copy `-o`, xclip `-l 1`?
if [ "$(uname)" == "Linux" ]; then
if is_wayland; then
wl-copy -n "$@"
else
xclip -i -sel c "$@"
fi
elif [ "$(uname)" == "Darwin" ]; then
pbcopy "$@"
fi