add spotify title paster

This commit is contained in:
Felix Van der Jeugt 2022-05-16 15:47:50 +02:00
parent 50e437f093
commit 75e3bc5b72
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,7 @@ curl
clipmenu
yubikey
emoji
spotify-title
HERE
)"
@ -85,4 +86,7 @@ case "$choice" in
choice="$(uni emoji all -f '%(name), %(cldr_full), %(emoji)' | awk -F', ' '{ i=1; while($i != $NF && $i != "") { print($i, $NF); i++ }}' | pick)"
inject "${choice##* }"
;;
'spotify-title')
inject "$(curl -L "$(xclip -o)" | sed -n 's@.*<title>\(.*\) - song by \(.*\) | Spotify</title>.*@\1 - \2@p')"
;;
esac