Skip to content

About

Minecraft-style jukebox widget for the Noctalia bar, drawn in Cairo.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

36 Commits

Folders and files

Repository files navigation

💿 mc-jukebox

A Minecraft jukebox for the Noctalia bar.

A jukebox block sits in your bar and puffs note particles while something plays. Click it and the panel opens — a slab of ground with a music disc in the slot.

The panel being used: pause, skip, shuffle

✨ The good bit

When the track changes, the old disc crouches, pops out and drifts away while the new one falls in and lands with a squash — in the panel and in the bar block, from the same animation.

Everything is drawn in Cairo at a 194×98 texture and upscaled by an integer, so every edge lands on a device pixel. No blur, no half-pixels, no fake pixel art.

🎛️ What's on it

🔀 shuffle · ⏮️ prev · ⏯️ play/pause · ⏭️ next · 🔁 loop off/one/all · 🔊 volume, dragged · a seekable progress bar · and a hidden button on the block corner that cycles the panel's face between grass, cobblestone, stone bricks and glass.

🧩 Two pieces

omega/jukebox A Noctalia plugin (Luau). Draws the block in the bar, forwards clicks.
mc-jukebox The panel: a GTK4 layer-shell window, drawn entirely in Cairo.

Two, because one can't do the other's job — a Noctalia widget is one image plus one text run, and onClick carries no coordinates, so the panel's buttons can't live there.

Both read dev.noctalia.Mpris rather than raw MPRIS, so the jukebox always agrees with the media widget beside it. The panel runs as a hidden daemon and the bar toggles it over a Unix socket, so opening it costs no process startup.

📦 Install

noctalia msg plugins source add omega ~/Projects/mc-jukebox

Then add the Jukebox widget to your bar. Needs python-gobject, gtk4, gtk4-layer-shell, pycairo.

mc-jukebox toggle      # what the bar widget calls
mc-jukebox next        # transport, no window needed
mc-jukebox status

✅ Tests

python -m pytest      # 262 passed

With MC_JUKEBOX_DEBUG=1, mc-jukebox click presses whatever the pointer is standing on — the same press-then-release a real click runs. Useful for driving the panel from a script when there's no hand available.

📓 The long version — why every decision went the way it did — is in docs/notes.md.


Code is MIT. The 16×16 disc and block textures under assets/ are Mojang's artwork, included so this looks like what it's imitating — not covered by this licence and not mine to relicence. A fan project, unaffiliated with Mojang or Microsoft. Monocraft by Idrees Hassan, under its own licence.

About

Minecraft-style jukebox widget for the Noctalia bar, drawn in Cairo.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages