Skip to content
AtsuraeDownload

Development sign-in

Only on a local server with DEV_AUTH. Enter any account name.

Now Playing Bar

The song and artist from Music or Spotify on a translucent pill, with a music-note icon. When nothing is playing, the whole widget disappears.

The Now Playing Bar widget

Download Now Playing Bar.atsuraewidget and drop it on the Widgets section of your Library, or create the files yourself:

Now Playing Bar.atsuraewidget/widget.json
{
"$schema": "https://atsurae.app/docs/schema/widget.schema.json",
"formatVersion": 2,
"id": "now-playing-bar",
"name": "Now Playing Bar",
"summary": "The current song in a pill that hides when nothing is playing.",
"author": "Atsurae",
"version": "1.0",
"elements": [
{ "type": "shape", "shape": "rect", "size": [0.34, 0.06], "cornerRadius": 0.03, "fill": "#00000066", "shadow": false, "visibleWhen": "{track}" },
{ "type": "image", "src": "images/note.svg", "size": [0.026, 0.026], "tint": "#FF4F8B", "offset": [-0.14, 0], "visibleWhen": "{track}" },
{ "text": "{track}", "font": { "size": 0.017, "weight": "semibold" }, "alignment": "leading", "offset": [-0.115, -0.009], "hideWhenEmpty": true },
{ "text": "{artist}", "font": { "size": 0.013 }, "opacity": 0.75, "alignment": "leading", "offset": [-0.115, 0.012], "hideWhenEmpty": true }
]
}
Now Playing Bar.atsuraewidget/images/note.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 18.5a3 3 0 1 1-2-2.83V5.5l12-2.5v12.5a3 3 0 1 1-2-2.83V7.4l-8 1.67z" fill="#000"/></svg>
  • The pill (a shape) and the icon (an image) use "visibleWhen": "{track}": they’re drawn only while {track} has a value.
  • The two text elements use "hideWhenEmpty": true, which does the same for text.
  • The icon is a black SVG with a tint, so it’s drawn in pink, or in whatever color the person picks.
  • Text is leading-aligned from x = −0.115, just right of the icon, so long titles grow to the right.
  • Truncate long titles in a script: return title.length > 32 ? title.slice(0, 31) + "…" : title.
  • Show the album’s name in a third line (it’s not available yet, so it’s a good feature request).