#!/usr/bin/env bash STATUS=$(playerctl status) case $STATUS in "Playing") TITLE=$(playerctl metadata title | sed s/_/\ /g) META="${TITLE:-Title}" curstatus=" 🎵 $META \uE0b1" ;; "Paused") TITLE=$(playerctl metadata title | sed s/.m4a//g) META="${TITLE:-Title}" curstatus=" || $META \uE0b1" ;; *) curstatus=" " ;; esac echo -e "$curstatus" case "$BLOCK_BUTTON" in 1) playerctl play-pause ;; esac exit 0