(defwidget music-button []
(button :onclick "playerctl play-pause"
"${music_data == '▶' ? '\⏸' : music_data.status == 'Playing' ? '\⏸' : '▶'}"))
(deflisten music_data
:initial {"status": ""}
`
playerctl metadata --format '{ "status": "{{status}}", "artist": "{{artist}}", "title": "{{title}}"}' || echo '{"status": ""}';
playerctl --follow metadata --format '{ "status": "{{status}}", "artist": "{{artist}}", "title": "{{title}}"}'
`)