dotfiles-remastered/.config/polybar/spotifyd-meta.sh

17 lines
218 B
Bash
Executable File

#!/usr/bin/env sh
meta(){
metadata=$(playerctl --player=spotify,%any -f "{{title}} - {{artist}}" metadata 2>/dev/null ) && echo $metadata
}
i=0
until meta || [ $i -gt 10 ];
do
sleep 1
let i=i+1
done
exit $?