Commit 1c343eb5a66f
nix/packages/my/scripts/bin/pbcopy
@@ -1,7 +1,11 @@
#!/usr/bin/env bash
set -e
if [ ! $(uname -s) = "Darwin" ]; then
- xsel --clipboard --input $@
+ if ! command -v wl-copy &> /dev/null; then
+ wl-copy $@
+ else
+ xsel --clipboard --input $@
+ fi
else
- pbpaste $@
+ pbcopy $@
fi
nix/packages/my/scripts/bin/pbpaste
@@ -1,7 +1,11 @@
#!/usr/bin/env bash
set -e
if [ ! $(uname -s) = "Darwin" ]; then
- xsel --clipboard --output $@
+ if ! command -v wl-paste &> /dev/null; then
+ wl-paste $@
+ else
+ xsel --clipboard --output $@
+ fi
else
pbpaste $@
fi