dotfiles/tools/clipboard

8 lines
174 B
Text
Raw Normal View History

2019-03-26 09:55:52 +00:00
#!/usr/bin/env bash
2020-07-30 19:40:05 +01:00
read contents
if [[ -x `which wl-copy > /dev/null 2>&1` ]]; then
2020-07-30 19:40:05 +01:00
echo "$contents" | wl-copy
else
echo "$contents" | xclip -selection clipboard
fi