#!/bin/bash

while :
do
  prev="$(playerctl --player=spotify metadata title)"
  item=$prev
  while [[ $item == $prev ]]
  do
    item="$(playerctl --player=spotify metadata title)";
    sleep 0.5;
  done
  kill -37 $(pidof dwmblocks);
  item="";
done