local-bin/common/boop.sh

15 lines
242 B
Bash
Raw Normal View History

#!/bin/sh
remote="https://boop.icu"
2020-12-20 20:30:34 +02:00
sound="$HOME/Projects/local-bin/sounds/success.ogg"
2021-04-08 11:17:33 +03:00
if [ !-f "/usr/bin/xsel" ]; then
echo "Please install xsel"
exit
fi
url=$(curl -F"file=@$1" $remote)
2021-04-08 11:17:33 +03:00
echo "$url" | tr -d '\n' | xsel -ib
mpv $sound