#!/bin/sh
dbus-monitor --session "member='PropertiesChanged'" | 
while read X; do
  if [[ $X == *"Metadata"* ]]; then
    TITLE=$(playerctl metadata title)
    ARTIST=$(playerctl metadata artist)
    notify-send "Now playing" "$TITLE - $ARTIST" -i :
  fi
done
