Re-adding boop, now using wayland
This commit is contained in:
parent
76c67a86b7
commit
149867f821
1 changed files with 21 additions and 0 deletions
21
common/boop.sh
Executable file
21
common/boop.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Siina's bootleg boop.icu uploader
|
||||
#
|
||||
# Requires:
|
||||
# - wl-clipboard: for clipboard manipulation
|
||||
# - curl: for uploading
|
||||
remote="https://boop.icu"
|
||||
sound="$HOME/Projects/local-bin/sounds/success.ogg"
|
||||
|
||||
# Make sure necessary applications are installed
|
||||
if [[ ! -n "$(which wl-copy)" ]]; then echo "Please install wl-clipboard"; exit; fi
|
||||
if [[ ! -n "$(which curl)" ]]; then echo "Please install curl"; exit; fi
|
||||
|
||||
url=$(curl -F"file=@$1" $remote)
|
||||
echo "$url" | tr -d '\n' | wl-copy
|
||||
|
||||
if [[ -n "$(which ffplay)" ]]; then
|
||||
ffplay $sound -nodisp -autoexit -loglevel error
|
||||
fi
|
||||
|
Loading…
Reference in a new issue