DEV Community

Emir Mrkaljević
Emir Mrkaljević

Posted on

Six themes for a 480x320 USB screen, and the bugs each one taught me

A few days ago I wrote about the tray app I built for the small USB screen inside my PC case. This is the follow-up: what it took to ship six themes for a 3.5 inch, 480x320 panel, and the bugs that came with them.

Six PanelOS themes cycling, every frame rendered by the app itself, no mockups

Render first, compile later

Every theme except Classic bundles its own fonts, so I can render any theme to a PNG on a machine with no screen attached. That changed my workflow: I preview a theme as an image, fix spacing and overlaps, and only build the exe once the image looks right. The clip above is made from those renders.

The screen only hears the first command

Turning the panel off on shutdown, restart and sleep sounded easy. It wasn't. When I sent two commands back to back, the screen only acted on the first one. Sending them one at a time fixed it, and now the panel goes dark when the PC does, with no BIOS changes.

One background froze everything

The Nature Flow theme rotates nature wallpapers every 10 minutes with a slow slide. One wallpaper made the panel freeze after the first strip of the image. The app always loaded it first, so it looked like the whole theme was broken. I removed it and added an automatic screen restart as a safety net.

Emoji in song titles

The now-playing block reads the track and cover from the local Spotify desktop app, no login or API keys. A song title with an emoji crashed the renderer. I fixed the title handling so emoji and other unusual characters no longer take the app down.

Switching themes from the tray

All six themes switch from the tray menu. Settings and the license key survive updates and reinstalls.

If you have one of these little screens: free Lite on the site, Pro (all themes) on Gumroad.

Happy to answer questions about the serial protocol or the rendering in the comments.

Top comments (0)