diff --git a/.config/polybar/spotifyd-meta.sh b/.config/polybar/spotifyd-meta.sh new file mode 100755 index 0000000..049c81f --- /dev/null +++ b/.config/polybar/spotifyd-meta.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env sh + +meta(){ + metadata=$(playerctl -f "{{title}} - {{artist}}" metadata) && echo $metadata +} + +i=0 + +until meta || [ $i -gt 10 ]; +do + sleep 1 + let i=i+1 +done + +exit $? +