local-bin/common/boop.sh

15 lines
260 B
Bash
Executable File

#!/bin/sh
remote="https://boop.icu"
sound="$HOME/Projects/local-bin/sounds/success.ogg"
if [ ! -f "/usr/bin/xsel" ]; then
echo "Please install xsel"
exit
fi
url=$(curl -F"file=@$1" $remote)
echo "$url" | tr -d '\n' | xsel -ib -l /tmp/xsel.log
mpv $sound