unixorn/tumult.plugin.zsh

View on GitHub
bin/mac-safesleep

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash
#
# Set your mac to use safesleep mode
#
# Copyright 2017, Joe Block <jpb@unixorn.net>

if [[ "$(uname -s)" != 'Darwin' ]]; then
  echo 'Sorry, this script only works on macOS'
  exit 1
fi

exec sudo pmset -a hibernatemode 0