Skip to content

macOS Caffeinate Daemon - Keeps macOS awake when connected to AC

Notifications You must be signed in to change notification settings

realJoshByrnes/LidLifter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

LidLifter - Prevent macOS from going to sleep when on AC.

LidLifter is a macOS LaunchDaemon crafted to keep your MacBook awake when in Clamshell mode (lid closed), particularly when connected to AC power. It prevents your MacBook from sleeping with the lid closed, ensuring uninterrupted workflows for developers, presenters, and users of external displays.

Beyond MacBooks, LidLifter extends its utility to any macOS device connected to AC power, allowing users to maintain continuous operation even when the lid is closed. Whether you're presenting slides, running lengthy computations, or managing servers remotely, LidLifter provides the reliability you need.

Installing LidLifter

To install LidLifter onto your macOS system:

  1. Open Terminal.

  2. Download the .plist File:

    • Use curl to download au.byrnes.jd.lidlifter.plist from GitHub:
      sudo curl -o /Library/LaunchDaemons/au.byrnes.jd.lidlifter.plist \
        https://raw.githubusercontent.com/realJoshByrnes/lidlifter/main/au.byrnes.jd.lidlifter.plist
  3. Load the LaunchDaemon:

    • Start LidLifter to prevent macOS from sleeping in Clamshell mode:
      sudo launchctl load -w /Library/LaunchDaemons/au.byrnes.jd.lidlifter.plist

Checking if LidLifter is Running

  1. Open Terminal.

  2. Check the LaunchDaemon status:

    • Check the current state of LidLifter:
      sudo launchctl print system/au.byrnes.jd.lidlifter | grep 'job state'

Disabling LidLifter

To temporarily disable LidLifter and allow macOS to sleep when connected to AC power:

  1. Open Terminal.

  2. Unload the LaunchDaemon:

    • Stop LidLifter from preventing macOS from sleeping.
      sudo launchctl unload -w /Library/LaunchDaemons/au.byrnes.jd.lidlifter.plist

Enabling LidLifter

To enable LidLifter again after disabling it:

  1. Open Terminal.

  2. Load the LaunchDaemon:

    • Start LidLifter to prevent macOS from sleeping when connected to AC power:
      sudo launchctl load -w /Library/LaunchDaemons/au.byrnes.jd.lidlifter.plist

Uninstalling LidLifter

To uninstall LidLifter from your macOS system:

  1. Open Terminal.

  2. Unload the LaunchDaemon:

    • Stop LidLifter from running:
      sudo launchctl unload -w /Library/LaunchDaemons/au.byrnes.jd.lidlifter.plist
  3. Remove the LaunchDaemon File:

    • Delete au.byrnes.jd.lidlifter.plist from /Library/LaunchDaemons/:
      sudo rm /Library/LaunchDaemons/au.byrnes.jd.lidlifter.plist

About

macOS Caffeinate Daemon - Keeps macOS awake when connected to AC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published