add spotify title paster

This commit is contained in:
Felix Van der Jeugt 2022-05-16 15:47:50 +02:00 committed by Felix Van der Jeugt
parent bc6ede5703
commit a2308c46ef
No known key found for this signature in database
GPG Key ID: 58B209295023754D

View File

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