Skip to content

alexrett/idler2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Idler

A tiny macOS menu bar app that keeps your Mac awake. One click to prevent sleep — no more interrupted downloads, builds, or long-running processes.

Rewrite of the original Go version in Swift — native SwiftUI, zero dependencies, single binary.

Sleep allowed     Sleep prevented

Why?

Corporate-managed Macs often enforce aggressive sleep policies that you can't override in System Settings. Your screen locks after a few minutes, your Slack/Teams status flips to "Away", and colleagues think you disappeared — even though you just stepped out for coffee while a build is running.

You could use caffeinate in the terminal, but that's easy to forget and annoying to manage. Idler is simpler — one click in the menu bar, and your Mac stays awake. Your messenger stays green, your screen stays on, and your long-running processes don't get interrupted.

How It Works

When activated, Idler:

  1. Creates IOKit power assertions to prevent both system sleep and display sleep
  2. Simulates user activity every 30 seconds
  3. Performs imperceptible mouse nudges (1 pixel) to defeat idle detection

When deactivated, all assertions are released and your Mac sleeps normally.

Features

  • One-click togglemoon.zzz / bolt icons right in the menu bar
  • Prevents both system and display sleep via IOKit power management
  • Activity simulation every 30 seconds — keeps Slack green too
  • No dock icon — lives quietly in the menu bar
  • Native macOS — SwiftUI, single binary (~300KB), zero dependencies

Install

Homebrew

brew install --cask alexrett/tap/idler

Download

Grab the latest Idler.dmg from Releases.

Signed and notarized with Apple Developer ID.

Build from Source

git clone https://github.com/alexrett/idler2.git
cd idler2
swift build -c release
open .build/release/Idler

Universal binary (Intel + Apple Silicon):

swift build -c release --arch arm64 --arch x86_64

Usage

  1. Launch Idler — look for 🌙 in the menu bar
  2. Click it → Prevent Sleep — icon changes to ⚡
  3. Click again → Allow Sleep — back to 🌙
  4. That's it

Requirements

  • macOS 13.0 (Ventura) or later
  • Works on both Apple Silicon and Intel Macs

License

MIT

About

Tiny macOS menu bar app that keeps your Mac awake. One click to prevent sleep. SwiftUI, zero dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors