mirror of
https://github.com/dredx/prole.git
synced 2026-09-24 18:34:31 +00:00
| .. | ||
| dist/ProleStatus.app/Contents | ||
| Sources | ||
| build.sh | ||
| README.md | ||
ProleStatus — macOS overlay bar
ProleStatus is a native macOS AppKit overlay bar that sits directly beneath the system menu bar on the primary display. It matches the menu bar’s width and thickness and uses the same translucent material. The bar is click‑through for normal interaction, supports hover tooltips, and exposes a context menu via a global hotkey.
Features:
- Three centered “traffic light” indicators:
- svc.prole.org:443 — green if reachable, red otherwise.
- Aggregate K3s: raspberry.prole.org:6443 and pi.prole.org:6443 — green if both, yellow if only one, red if none.
- Local k3d: localhost:6443 — green if reachable, red otherwise.
- Periodic TCP health checks with short timeouts and latency measurement.
- Auto‑hide/reposition to mirror the menu bar’s visibility and the active Space.
- Global hotkey: Command+Option+Shift+P opens a context menu with status text, Refresh Now, and Quit.
Minimum: macOS 12 (Monterey)
Build & run (Xcode)
- Create a new macOS App project in Xcode (AppKit, Swift). Save/open the project under
proleStatus/. - Remove the main storyboard entry point if present and include
Sources/main.swift. - Set deployment target to macOS 12+.
- Add all files from
Sources/to the app target:main.swift,AppDelegate.swift,OverlayWindow.swift,StatusView.swift,HotKeyManager.swift,ServiceChecker.swift. - Build & run on “My Mac”. Use Command+Option+Shift+P to open the context menu.
Notes
- The overlay shows only on the primary display, and hides in full‑screen Spaces where the menu bar is hidden.
- Clicks pass through to underlying apps; hover tooltips still work.
- Health checks run every 30 seconds. A HH:mm:ss timestamp is displayed after the last status light. Use the context menu “Refresh Now” to force an immediate update.
Directory layout
Sources/— Swift source files for the overlay app..gitignore— ignores Xcode/SwiftPM build artifacts.
Build without Xcode (CLI)
- Requirements: Xcode Command Line Tools (
swiftc,codesign,lipo). - A convenience script
build.shis provided to compile and package a.appbundle without opening Xcode.
Steps:
cd proleStatus
chmod +x build.sh # first time only
# Build for your current architecture (arm64 on Apple Silicon, x86_64 on Intel)
./build.sh build
# Optionally, build a universal app (arm64 + x86_64)
./build.sh build-universal
# Run the built app
./build.sh run
# Package into a zip
./build.sh package
# Clean artifacts
./build.sh clean
Outputs:
- The app bundle is placed at
proleStatus/dist/ProleStatus.app. - The universal build creates a fat binary using
lipo. - The app is ad‑hoc signed for local running (
codesign -s -). For distribution/notarization, replace with your signing identity.