bin: Merge clipboard wrappers
This commit is contained in:
parent
6627f790da
commit
303c3ab55e
9 changed files with 108 additions and 20 deletions
22
bin/cbwatch
Executable file
22
bin/cbwatch
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cmd="$@"
|
||||
if [ -z "$cmd" ]; then
|
||||
cmd=cat
|
||||
fi
|
||||
|
||||
OSTYPE="$(uname -s)"
|
||||
case "${OSTYPE}" in
|
||||
Linux)
|
||||
exec wl-paste --watch $cmd
|
||||
;;
|
||||
Darwin)
|
||||
>&2 echo "TODO: Make this work on macOS"
|
||||
;;
|
||||
*)
|
||||
>&2 echo "Unknown OS type: ${OSTYPE}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue