Show HN: Nocturne, a macOS app that makes the menu bar clock unreadable

dotcomjack1 pts0 comments

GitHub - dotcomjack/nocturne: Stop your macOS menu bar clock from telling you it is 3am. One click, no permissions, no private APIs. · GitHub

/" data-turbo-transient="true" />

Skip to content

Type / to search

Sign in<br>Sign upAppearance settings

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

dotcomjack

nocturne

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>15 Commits<br>15 Commits

Resources

Resources

Sources

Sources

docs

docs

scripts

scripts

.gitignore

.gitignore

LICENSE

LICENSE

README.md

README.md

build.sh

build.sh

project.yml

project.yml

View all files

Repository files navigation

Nocturne

Stop your menu bar clock from telling you it is 3am.

You are deep in something good. Your eye flicks to the corner out of habit, reads<br>3:14 AM, and the work is over. Not because you got tired, because you got told.

Nocturne takes the clock away, in one click, and gives it back the same way.

macOS 14 or later. No permissions. No private APIs. Around 1,000 lines of Swift.

The part worth stealing even if you never install this

You cannot hide the macOS menu bar clock. Not with a checkbox, and not with<br>any of the defaults incantations that turn up when you search for it.

The clock is the one menu bar item Apple gives no visibility toggle. In System<br>Settings under Menu Bar, Siri, Spotlight, Wi-Fi, Bluetooth, Battery and AirDrop<br>all have a checkbox. Clock has a Clock Options button and nothing else.

Three widely repeated tricks are dead. Measured on macOS 26.3.1 by reading the<br>on-screen width of Control Center's Clock window before and after each write:

Approach<br>Clock width

Baseline, Sat Aug 8 2:43 AM<br>142pt

defaults -currentHost write com.apple.controlcenter Clock -int 8<br>142pt, no effect

defaults write com.apple.controlcenter "NSStatusItem VisibleCC Clock" -bool false<br>142pt, no effect

defaults write com.apple.menuextra.clock DateFormat -string " "<br>142pt, no effect

defaults write com.apple.menuextra.clock IsAnalog -bool true<br>44pt

_HIHideMenuBar and AutoHideMenuBarOption do not work either. Both store fine,<br>and System Settings reads the value back correctly, but neither applies without a<br>logout, which makes them useless for a toggle.

So the trick is not to hide the clock. It is to make it unreadable . An analog<br>dial at 44pt still tells the time, in the sense that a sundial in another room<br>tells the time. Your eye stops catching it, and nothing is hidden, moved, or<br>drawn over.

Measure, do not screenshot. Every number above came from<br>CGWindowListCopyWindowInfo, reading the clock window's width directly.<br>Sleep-and-screenshot lied twice during development: Control Center takes a few<br>seconds to repopulate after a restart, and a screenshot taken during that gap<br>shows an empty menu bar that looks exactly like a successful hide.

And the window list has a trap in it. kCGWindowBounds is free to read, but<br>kCGWindowName is gated behind Screen Recording. An early version of the locator<br>filtered on name == "Clock" and appeared to work perfectly, because it was<br>being launched from a terminal and inheriting that terminal's permission.<br>Launched normally as an app it returned nothing, silently:

launched as<br>windows with a readable name<br>clock found

bare binary from Terminal<br>10<br>yes

.app via open<br>no

So Nocturne identifies the clock by where it sits , never by what it is<br>called. If you test anything against the window list, test it as a real app<br>bundle, not from your shell.

Install

Download Nocturne 1.1.1 ,<br>unzip, drag to Applications, open it.

Signed with a Developer ID and notarized by Apple, so it opens on a double click<br>with no right-click-to-open dance and no Gatekeeper warning. Universal, Apple<br>silicon and Intel.

Or build it yourself, which is the point of it being MIT:

git clone https://github.com/dotcomjack/nocturne.git<br>cd nocturne<br>./build.sh

Requires xcodegen (brew install xcodegen) and Xcode.

Use

The menu bar icon is the whole interface. Click it for modes, settings and<br>quit, the same as every other menu bar app.

Four modes:

Mode<br>What it does

Clock visible<br>Normal macOS clock.

Blind (default)<br>Analog dial. The time is there, you just cannot read it.

Gone<br>A patch drawn over just the clock. Experimental, see below.

Hide everything<br>The whole menu bar goes blank, except Nocturne's own icon. Clicks still work, you just cannot read it.

Settings also exposes the same switches as System Settings under Menu Bar and<br>Clock Options, so you can drop just the date, just the day, or just AM/PM without<br>touching a mode. The menu bar icon can shimmer on a timer, off by choice, with a<br>700ms sweep top to...

clock menu nocturne settings window apple

Related Articles