A lightweight macOS menu bar app for naming and organizing your desktop spaces.
I built SpaceLabel to reduce friction during AI-driven development. When collaborating with AI on projects, I often work on 3–5 projects simultaneously. Each project gets its own macOS desktop space — a terminal for the dev server, a terminal running Claude Code, a browser showing the app, and whatever other windows that project needs. I switch between projects with a touchpad swipe or Ctrl + Arrow, and I have two monitors linked so both screens switch together. While Claude chugs away on one project, I swipe over to a different one and keep going.
It works great, except for one thing: it often takes a few seconds to figure out which project I just switched to. I might have an experiment with a new library on one desktop space, changes to my blog on another, and a research agent I'm building on a third. That moment of figuring out where I am is a small friction, but it happens countless times and small frictions compound.
macOS gives you nothing here. Desktop spaces are just numbers in Mission Control. No labels, no context, no memory of what you were doing there.
SpaceLabel fixes that. It's a menu bar app that lets me name my desktop spaces and shows a HUD overlay when I swipe to one. A translucent panel flashes the project name and a preview of my notes. I swipe, I see "Testing Library" or "Blog" or "Research Agent" and I know where I am.
- Name your spaces — give each desktop space a project name like "Blog Redesign" or "Tax Prep"
- Color tags — assign one of 7 colors; shown as a colored dot in the menu bar, a tint on the HUD, and in the popover
- Notes — free-form notes per space, auto-saved when the popover closes
- HUD overlay — instantly shows the space name, number, notes preview, and color tint when you switch desktops
- Global hotkey —
Control + /toggles the popover from anywhere - Escape to close — press Escape to save and dismiss
- Persistent — names, notes, and colors survive app restarts and reboots (stored in UserDefaults)
- Space lifecycle — automatically detects when spaces are added or removed and cleans up orphaned profiles
- macOS 15.0+
- Apple Silicon (arm64)
git clone https://github.com/SeanLikesData/SpaceLabel.git
cd SpaceLabel
./Scripts/build.shThe build script compiles with swiftc, assembles a .app bundle, and launches it. The resulting app is at .build/SpaceLabel.app.
To install permanently:
cp -r .build/SpaceLabel.app /Applications/To start on login: System Settings > General > Login Items > "+" > SpaceLabel
SpaceLabel uses Apple's private CoreGraphics Server (CGS) APIs to detect desktop spaces — there's no public API for this. Functions like CGSGetActiveSpace and CGSCopyManagedDisplaySpaces are called via Swift's @_silgen_name attribute, avoiding the need for a C bridging module.
The app listens for NSWorkspace.activeSpaceDidChangeNotification to detect space switches in real time, and polls every 10 seconds to catch space additions/removals (which don't fire notifications).
The HUD overlay uses a borderless NSPanel with canJoinAllSpaces so it appears on every desktop. The menu bar color dot is rendered as a non-template NSImage to bypass macOS's monochrome template rendering.
The project uses swiftc directly rather than Swift Package Manager due to a bug in the macOS Command Line Tools where a duplicate SwiftBridging module map causes compilation failures. The build script creates a patched toolchain symlink tree as a workaround.
Sources/SpaceLabel/
├── App/
│ ├── SpaceLabelApp.swift # @main entry, MenuBarExtra with colored dot label
│ ├── AppState.swift # Central state: detector + store + HUD via Combine
│ └── AppDelegate.swift # Global hotkey registration (Control+/)
├── Space/
│ ├── SpaceDetector.swift # CGS private API wrapper for space detection
│ └── SpaceInfo.swift # Space data model (UUID, managedID, index, display)
├── Storage/
│ ├── SpaceProfile.swift # Codable model: name, notes, colorTag, lastEdited
│ └── SpaceDataStore.swift # UserDefaults persistence layer
├── Views/
│ ├── SpaceListView.swift # Popover container
│ └── SpaceDetailView.swift # Edit name, notes, color tag
└── HUD/
├── HUDView.swift # SwiftUI HUD with vibrancy + color tint
├── HUDPanel.swift # Borderless NSPanel configuration
└── HUDController.swift # Show/hide lifecycle with timer
MIT


