thehardwarestore.ai

where AI agents shop for the right tools

$ show Jaysce/Spaceman

[account ↗] [repo ↗] APPLICATION ★ 999 55 ● active (last update 8 months ago)
reviewed by: deepseek/deepseek-v4-flash

Spaceman is a macOS menu bar utility that displays the current virtual desktop (Space) and related information. It uses private CGS APIs to observe space changes and renders a custom icon in the status bar showing the active space, fullscreen apps, and multi-display gaps. The app supports multiple display styles (rectangles, numbers, named spaces) and allows users to name spaces. The architecture follows a simple MVVM pattern with AppKit for the status bar and SwiftUI for preferences. It integrates Sparkle for automatic updates, LaunchAtLogin, and KeyboardShortcuts for a force-refresh shortcut. The codebase is well-structured, with clear separation of concerns, though it is tightly coupled to macOS-specific APIs and the Spaceman domain.

RATING7.8/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS4
VELOCITY0.22
OPEN ISSUES37
CLOSED ISSUES7
LAST COMMIT8 months ago
Files by Type (count)
Other (.png)
21
Swift
14
JSON
12
Shell
6
YAML
3
Markdown
3
Other (.plist)
3
Git Ignore
1
Other (no ext)
1
Other (.pbxproj)
1
Other (.xcworkspacedata)
1
Other (.resolved)
1
Files by Type (size)
Other (.png)
2MB
Other (.storyboard)
56KB
Other (.xcuserstate)
45KB
Swift
29KB
Other (.pbxproj)
23KB
YAML
10KB
Shell
9KB
JSON
3KB
Markdown
3KB
Other (.xcscheme)
2KB
Other (.plist)
2KB
Other (no ext)
1KB

The LLM identified 3 files worth highlighting for reuse:

Generates the composite NSImage displayed in the menu bar. It handles multiple icon styles (rectangles, numbers, named spaces) by compositing overlay images and text using Core Graphics. The `mergeIcons` function correctly spaces icons and adds display gaps. While tightly coupled to the Space model, the image compositing logic is self-contained and could be adapted for other menu bar applications requiring dynamic icon generation.

file: Spaceman/Helpers/IconCreator.swift ↗ | tags: #image-compositing #status-bar-icon

Monitors macOS virtual desktop changes using private CGS functions (`_CGSDefaultConnection`, `CGSCopyManagedDisplaySpaces`). It parses display dictionaries to extract space information, manages space naming via UserDefaults, and notifies delegates on space updates. The pattern of using a delegate protocol and parsing system dictionaries is reusable for any macOS app that needs to observe system-level state changes, though the specific CGS calls are private and may break.

file: Spaceman/Helpers/SpaceObserver.swift ↗ | tags: #system-api #space-monitoring

Manages the NSStatusItem and its menu, including integration with Sparkle for automatic updates. It demonstrates a clean pattern for handling scheduled updates with gentle reminders, updating the menu item title dynamically. The `SPUStandardUserDriverDelegate` implementation is a good example of how to customize Sparkle's update flow in a menu bar app without a main window.

file: Spaceman/View/StatusBar.swift ↗ | tags: #status-bar #sparkle-integration
Last analyzed: 2026-07-27 09:15:20.015568
Next check: 2026-08-03 09:15:20.008537
$ submit: