From 75e3bc5b7268acc7f82aadf4ea55e4e672fb0334 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Mon, 16 May 2022 15:47:50 +0200 Subject: [PATCH] add spotify title paster --- local/bin/delegator | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/local/bin/delegator b/local/bin/delegator index 31ae985..3ac08dc 100755 --- a/local/bin/delegator +++ b/local/bin/delegator @@ -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@.*\(.*\) - song by \(.*\) | Spotify.*@\1 - \2@p')" + ;; esac