NoSleep: A Lightweight macOS Menu Bar App with SwiftUI
Have you ever been mid-presentation, watching a long build compile, or waiting for a large file to download — only for your Mac to decide it's nap time? macOS ships a built-in tool for exactly this...

Source: DEV Community
Have you ever been mid-presentation, watching a long build compile, or waiting for a large file to download — only for your Mac to decide it's nap time? macOS ships a built-in tool for exactly this: caffeinate. But running it from the terminal every time is clunky. So I built NoSleep — a tiny macOS menu bar utility that wraps caffeinate in a one-click toggle. No Dock icon. No main window. Just a cup icon in your menu bar. Features One-click toggle — start/stop caffeinate from the menu bar Duration presets — 15 min, 30 min, 1 hr, 2 hr, 4 hr, 8 hr, 10 hr, or Indefinite Live countdown — shows remaining time while active (e.g. 2h 34m) Start at Login — optional LaunchAgent so it auto-starts on boot Prevents display + idle sleep — uses caffeinate -d -i The Stack Swift 6.0 with strict concurrency SwiftUI + MenuBarExtra (macOS 13+) Swift Package Manager — no Xcode project file required Minimum target: macOS 14 (Sonoma) App Entry Point: MenuBarExtra The entire app lives in the menu bar, which S