Skip to content

Instantly share code, notes, and snippets.

@jthodge
Created January 2, 2020 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jthodge/680acd6b5d564e9073c999f103290e14 to your computer and use it in GitHub Desktop.
Save jthodge/680acd6b5d564e9073c999f103290e14 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Set standby delay on battery to 12hr
sudo pmset -b standbydelay 43200
# Disable it entirely on battery
sudo pmset -c standby 0
# Disable hibernation
sudo pmset -a hibernatemode 0
# Enable hibernation
# sudo pmset -a hibernatemode 3
# Free disk space occupied by hibernation
# * This file is automatically recreated as needed if hibernation is reenabled and it doesn't already exist.
# sudo rm /var/vm/sleepimage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment