Created
March 5, 2021 20:15
-
-
Save daystram/4619a0d19265bb8bc0e70ac7e06f558d to your computer and use it in GitHub Desktop.
Revisions
-
daystram created this gist
Mar 5, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/bin/bash set -e FLAG="$HOME/.lidsleep" if [[ -f $FLAG ]]; then sudo pmset -a disablesleep 0 rm $FLAG echo "lidsleep: enabled sleep on lid close" else sudo pmset -a disablesleep 1 touch $FLAG echo "lidsleep: disabled sleep on lid close" fi