CHECKING STATUS
I AM LISTENING TO
|
 PROJECT

I Got Tired of My macOS Menu Bar Looking Like a Garage Sale, So I Built Spacer Engine

1. June 2026
.SHARE

Table of Contents

Here’s the thing about the macOS menu bar: Apple gives you zero control over it. Your apps just pile in from the right, squeezing together like commuters on a rush-hour train, and you either live with it or you don’t. There’s no padding, no grouping, no breathing room. Just a wall of tiny icons staring back at you.

I got fed up with it. So I built Spacer Engine. Also using Thaw (fork of ICE) to organize my menubar items. Perfect fit on my ultrawide monitor ;) Love to have my main menu items in the middle.

What It Actually Does

The core idea is simple: Spacer Engine creates invisible menu bar items that act as spacers. You control their width — anywhere from 10 to 2500 pixels — and you can place them anywhere in the bar. Want a gap between your communication apps and your system utilities? Done. Want a wide empty zone in the middle to visually split the bar into sections? Also done.

Each spacer lives as a real NSStatusItem behind the scenes, so macOS treats it exactly like any other menu bar icon. It remembers its position across restarts. It responds to clicks. It plays nice with everything else.

But just making invisible rectangles felt like leaving money on the table, so I kept going.

You Can Also Put Stuff On Them

Every spacer can carry a label — a centered character or short string rendered right on the button. I use a middle dot · as a subtle section divider, but some people go full custom text. You can also assign an SF Symbol icon from Apple’s system library, which opens up some genuinely nice-looking possibilities: a small calendar icon, a gear, a wifi symbol, whatever makes sense to you.

There’s a tint color system too. Enable the “Helper Blueprint” on any spacer and it gets a colored background — adjustable per spacer, with a global corner radius setting that rounds the pill shape. It’s useful when you’re setting up your layout and want to see exactly where your spacers land. Turn it off when you’re done and they go invisible again.

The Part I’m Actually Proud Of: Mini-Status Scripting

This is where it gets interesting. Any spacer can run a shell script on a repeating timer and display the output directly on the button.

Let me say that again: the spacer becomes a live readout for anything a shell command can produce.

I have one showing my current git branch. Another one pings a local server and shows the HTTP status code — green when it’s 200, red when it’s not. A third one shows my active Kubernetes context so I don’t accidentally push to production because I forgot to switch clusters (I’ve done this. It was fine. Mostly.)

The timer is configurable — 5 seconds, 15 seconds, up to 30 minutes, whatever makes sense for the data. The script runs in a background thread so it never blocks the UI. And it supports full ANSI color codes, so your output can use color to communicate state. Here’s a quick example:

Drop that in, set it to refresh every 15 seconds, and you’ve got a color-coded health indicator permanently visible in your menu bar. No separate app, no browser tab, no dashboard you forget to check.

The script editor has syntax highlighting for shell — comments, strings, variables, keywords all get colored. Return key confirms and closes. Option+Return if you actually want a newline inside the script. There’s also a “Keep spacer width” option if you want the spacer to hold its fixed size instead of auto-resizing to fit the output text.

There’s Also a Hidden macOS System Setting in There

This one’s a bit of a bonus hack. The Preferences window has a Menu Bar Density slider that goes from 6 to 16 pixels. What it actually does is write to NSStatusItemSpacing and NSStatusItemSelectionPadding in the macOS global defaults domain and restart SystemUIServer.

In plain English: it changes the gap between every icon in your menu bar, system-wide. Squash everything closer together if you’re running out of room, or spread things out if you’ve got space. The “restarts the menu bar” part is a little dramatic — it flickers for half a second — but the result sticks until you change it again.

Previously you’d have done this with a Terminal command and a process kill. Now there’s a slider.

Layout Profiles Because I Keep Changing My Setup

If you’re anything like me, you’ll spend an afternoon getting your spacer layout exactly right and then wonder what you were thinking three days later. Layout Profiles let you save a named snapshot of your entire spacer configuration and switch between them in one click from the dashboard menu.

I keep a “focused” profile with minimal spacing and no scripts running, and a “monitoring” profile with a handful of Mini-Status spacers tracking various things. Switching between them takes about a second.

You can also export the whole thing as a JSON file and import it on another machine. Plain text, human-readable, no surprises.

The Technical Stuff (Quickly)

It’s a single Swift file. No SwiftUI — pure AppKit, because I wanted full control and AppKit gives you that even when it makes you earn it the hard way. Universal binary, so native on Apple Silicon and Intel. No external dependencies, no network calls, no Electron. The app has LSUIElement = YES set, meaning it has no Dock icon and doesn’t show up in the App Switcher. It just lives in the menu bar where it belongs.

Configuration is stored as JSON in UserDefaults. Position memory is handled by NSStatusItem.autosaveName — macOS tracks where each item was, so your layout survives restarts without me having to write any tracking code. That was a nice surprise when I discovered it.

Is It Perfect?

Nah. The Preferences window name column is getting a little narrow now that I’ve added symbol and script buttons to every row. The ANSI color parser handles the common codes but probably falls over on something obscure. And if you write a script that hangs forever, the spacer just sits there showing nothing — there’s no timeout yet.

But it does what I built it to do, I use it every day, and my menu bar finally looks the way I want it to look. That’s good enough for me — and hopefully good enough for you too.

Want to give it a spin. Will share the build app file soon, so that you can take it for a spin. You will need to bypass Apple’s Gatekeeper to use it for now. I might officially sign / notorize it in the future.

  1. Double-click the app to launch it. You will get an error saying the app cannot be opened. Click OK.
  2. Open System Settings and go to Privacy & Security.
  3. Scroll to the bottom to the Security section. You will see a notice that the app was blocked.
  4. Click Open Anyway and enter your Mac’s password to confirm

Spacer Engine is part of the cubicFUSION toolbox. Built with Swift, AppKit, and an unreasonable amount of opinions about menu bar layout.

Let’s Talk!

Looking for a reliable partner to bring your project to the next level? Whether it’s development, design, security, or ongoing support—I’d love to chat and see how I can help.

Get in touch,
and let’s create something amazing together!

RELATED POSTS

PDF operations are one of those recurring pain points that never fully go away. You need to fill a contract template, strip and rewrite document metadata before archiving, generate an invoice from an HTML template, and stamp every page with a branded header. The default answer is a SaaS API subscription that charges per document […]

Generating PDFs on a server is one of those tasks that sounds simple until you actually sit down to do it. HTML-to-PDF rendering drifts between browsers, LibreOffice headless mode is finicky to install, and most SaaS solutions charge per page once you hit volume. Gotenberg solves this cleanly: a single Docker container that bundles headless […]

I already wrote about FAQ schema in 2026 — short version: it’s still useful, just not the rich-snippet darling it once was. But that piece got a lot of follow-up questions like “okay, what about all the OTHER schema types?” Fair question. Here’s the deal in 2026: Google quietly killed seven more schema types’ rich […]

Alexander

I am a full-stack developer. My expertise include:

  • Server, Network and Hosting Environments
  • Data Modeling / Import / Export
  • Business Logic
  • API Layer / Action layer / MVC
  • User Interfaces
  • User Experience
  • Understand what the customer and the business needs


I have a deep passion for programming, design, and server architecture—each of these fuels my creativity, and I wouldn’t feel complete without them.

With a broad range of interests, I’m always exploring new technologies and expanding my knowledge wherever needed. The tech world evolves rapidly, and I love staying ahead by embracing the latest innovations.

Beyond technology, I value peace and surround myself with like-minded individuals.

I firmly believe in the principle: Help others, and help will find its way back to you when you need it.