#swift
Feed
- Feb 25
Built AlwaysOnTop — a tiny macOS menu bar utility that pins any window above everything else.
Hit Right⌘ + Right⌥ + / on any focused window and it floats above all other windows, even fullscreen apps. Uses ScreenCaptureKit to mirror the window into a floating overlay at screenSaver level.
Had to reach for some private CoreGraphics APIs (
CGSSetWindowLevel,_AXUIElementGetWindow) since modern macOS doesn't let you manipulate window levels for other apps through public APIs. The overlay approach works around this by capturing and redisplaying the window content.Useful when you want to keep a video, reference doc, or terminal visible while working in another app.