November 30, 2026

Lidless and  Paneless

I built two menu bar apps for two things I was tired of working around. The screenshot tool I used had stopped getting updates. The Mac went to sleep every time I closed the lid. A few years ago I would have lived with both. A small personal app was more project than it was worth. It isn’t anymore. I can sit down with a coding agent, finish the tool I actually want, and keep it.

Paneless replaced the screenshot tool. It still opened. The part I relied on was stuck with the last release: drag a region, mark it up, copy it into whatever I was writing. Shift-Command-9 does that now. A region, a window, or the whole screen. Pen, arrow, box, highlighter, text, emoji. Return copies it.

I freeze the screen before drawing. Each display gets covered with the picture I just took, and the marks go on the picture. On the live desktop the window can slide out from under the arrow, and a click can land in the app behind it. The fiddly part is making that click hit the right window. The frames and the pixels come from different places, and they count y in opposite directions. Quartz starts at the top left of the main display and goes down. The overlay is an ordinary Cocoa view and goes up. Skip the conversion and the highlight misses, sometimes by a whole second monitor. The image is captured at the screen’s full resolution, and I tag it with the size I dragged so a Retina shot pastes at that size.

Screen Recording permission is tied to the app’s signature. I learned that by granting it after every rebuild. An ad-hoc signature changes each build, so macOS treated every one as a new app. Local builds are signed with one self-signed certificate, Paneless Local Signing, and I only had to allow it once. The hotkey goes through Carbon, so it never also asked for Accessibility. The zip on the releases page is still ad-hoc signed. There’s no Developer ID certificate behind it, so an update can bring the prompt back.

Lidless is the sleep problem. I wanted the Mac awake while I still needed it, and asleep when I was finished. Closing the lid always won. caffeinate covers the easy half, a power assertion for as long as the command is running, and I wanted that in the menu bar with a duration I could see. Pick a time, or leave it on. The icon fills in while a session is running. There’s a preference that lets the display sleep while the computer stays up.

The lid ignores that assertion. The setting that stops lid-close sleep is pmset disablesleep. It needs an administrator, and it turns sleep off for the whole machine, Apple menu included. Forget to turn it back off and sleep stays off. I didn’t want a utility that could leave my laptop like that, so most of the app is the cleanup. The first time I enable it, Lidless asks for my password once and installs /etc/sudoers.d/lidless, after visudo checks the file. The rule allows two commands:

/usr/bin/pmset -a disablesleep 1
/usr/bin/pmset -a disablesleep 0

The switch is on only during a session. The timer ends, or I choose Turn Off, or I quit, and sleep comes back. A force-quit can’t run that cleanup, so the app writes down that it disabled sleep and restores it the next time it opens. If I had already disabled sleep myself, it leaves that alone. On battery a lid-closed session stops at 10 percent. A closed laptop has nowhere to put the heat.

Paneless has a demo of the markup in the browser, and the source. Lidless and its source.

← (Almost) Everything I Know About Choosing Colors
Written and Published by Matt Sheehan
Fast learner, amateur coffee drinker, good guy, programmer.
Mostly in that order.