From 828da789ee3262165ae3238e292845cbde862f94 Mon Sep 17 00:00:00 2001 From: Niklas Date: Thu, 18 Jun 2020 14:32:38 +0200 Subject: [PATCH] added spotify metadata script to polybar --- .config/polybar/spotifyd-meta.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 .config/polybar/spotifyd-meta.sh 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 $? +