Development
just dev # build and run in the foreground, logs in the terminaljust restart # rebuild, reinstall ~/Applications/Polso.app, relaunchjust snapshot # render every state to ./snapshots as PNGjust film # re-render the clips in docs/mediajust bundle # dist/Polso.app + dist/Polso.zipSwift 5 language mode, SwiftUI, macOS 14+. No dependencies. Builds with
swift build -c release --build-system native.
Layout
Section titled “Layout”| file | |
|---|---|
main.swift |
entry, NotchPanel (borderless panel above the menu bar), hover tracking, snapshots |
Store.swift |
all live state: wings, pings, alert queue, log, config reload, poller |
Messages.swift |
the wire protocol parser, shared by the socket and sources |
SocketServer.swift |
POSIX unix socket, one reply per line, single-instance handoff |
Sources.swift |
exec, prometheus and scrape pollers, exposition parser |
Config.swift |
config schema, defaults, deep merge, validation |
Notch.swift |
notch shape, idle wings, comet, spring transitions |
Burst.swift |
alert banner, sparks, rim glow |
Expanded.swift |
the hover panel |
Settings.swift |
settings window |
Indicators/ |
line, gauge, dots and the Indicator protocol |
Film.swift |
deterministic renderer for the docs clips |
Snapshots
Section titled “Snapshots”just snapshot renders idle wings for every indicator, comets, alert bursts at several times, the expanded panel
and each settings tab with synthetic data. It’s the fastest way to check a visual change, even on a Mac without
a notch.
The clips on this site are rendered, not screen-recorded. Film.swift drives the real notch views frame by frame
on a fixed timeline, using the same springs and keyframes as the live app, and writes PNG frames.
scripts/encode-film.sh turns them into animated WebP and MP4. Needs brew install ffmpeg webp.
This site
Section titled “This site”Astro + Starlight in site/. The landing page notch is a canvas port of the app (site/src/components/Notch.astro)
running the same protocol parser.
cd site && pnpm install && pnpm devPushes to main that touch site/ or docs/media/ deploy to GitHub Pages.