r/SwiftUI • u/Street-Lab7620 • 8h ago
Solved I rebuilt a Linux desktop's bar panels in SwiftUI, matching the original's design pixel for pixel
For my project omarchy-macos (Omarchy's Linux desktop look, on macOS), I rebuilt Omarchy's QML bar panels as a SwiftUI menu-bar app: Wi-Fi, audio, Bluetooth, power, display, calendar and weather.
Some things that were interesting to solve:
- Porting QML layouts to SwiftUI with the same metrics and font scale
- Following the theme live: every panel re-renders from a palette file when you switch themes
- Talking to CoreAudio, CoreWLAN, IOBluetooth and DisplayServices directly
- A ~30 KB C client so clicks on the bar open panels instantly (launching the Swift binary added visible lag)
It's built with swiftc and a shell script, no Xcode project. Source (MIT):
https://github.com/prashantkoirala465/omarchy-macos/tree/main/src/barpanel
Feedback on the code is welcome.