added spotifyd title display in polybar

This commit is contained in:
2020-06-17 11:25:22 +02:00
parent 5bff7a1f1e
commit 1148d940ec
2 changed files with 24 additions and 2 deletions

View File

@@ -1,3 +1,18 @@
#!/usr/bin/env sh
notify-send "$(playerctl -f "{{title}} - {{artist}}" metadata)"
# send ipc to polybar to update
hook (){
polybar-msg hook spotifyd 1
}
i=0
until hook || [ $i -gt 10 ];
do
sleep 1
let i=i+1
done
exit $?