Disclaimer - this was created with a lot of help from generative AI (Github Copilot), but I'm confident it's safe and happy with the result.
Spotify Widget – a floating Now Playing controller in a single Keyboard Maestro macro
A small album-art widget for Spotify that stays on top of other windows. It's one macro containing a Custom HTML Prompt, with no helper macros or external apps. I built it to replace Silicio, which kept hanging on my Mac.
Features
-
Album artwork for the current track, with a smooth crossfade when the track changes.
-
Hover controls: move the pointer over the widget to show a blurred overlay with title, artist/album, previous, play/pause and next. Long titles scroll right to left.
-
Progress bar along the bottom edge.
-
Scroll to change system volume: scroll over the widget, and an Apple Watch–style indicator appears on the right edge.
-
Drag anywhere to move it. On release it snaps to the nearest screen corner, and its position is remembered.
-
Close (✕) hides the widget. It comes back automatically when Spotify starts playing again.
-
Double-click the artwork to bring Spotify to the front, or to open it if it's not running.
-
Shows on all desktops and stays above other windows.
Lightweight
-
The widget talks to Spotify directly from its own window, so no macros run in a loop and the Keyboard Maestro menu-bar icon doesn't spin.
-
Idle CPU use is about 1–2% combined.
-
Work pauses when nothing is visible: the progress bar stops when playback is paused, and hover checks stop when the widget is hidden.
How it works
The macro has two modes, both explained in Comment actions inside it:
-
Show mode (login, unlock, or run manually) opens the widget, unless it's already open.
-
Volume mode runs when the widget triggers the macro with the value
SpotifyWidgetVolume. It sets the system volume outside the widget's window, so scrolling stays smooth.
Setup
-
Import the group and make sure it's enabled. The widget appears at your next login or unlock, or you can run Spotify Widget manually.
-
Optional: set the variable
SpotifyWidgetSizeto change the size (default 150, range 100–800). -
On first run it sets Keyboard Maestro Engine windows to appear on all desktops (
com.apple.spacesapp-bindings) and restarts the Dock once. -
macOS will ask for permission for Keyboard Maestro Engine to control Spotify and System Events.
Notes
-
Closing with ✕ only hides the widget. Quitting the Keyboard Maestro Engine closes it fully.
-
Volume control needs an output device whose volume macOS can set.
Spotify Widget.kmmacros (35 KB)


