Skip to content

Instantly share code, notes, and snippets.

@matejc
Last active August 29, 2015 14:21
Show Gist options
  • Save matejc/35021694e461ea155129 to your computer and use it in GitHub Desktop.
Save matejc/35021694e461ea155129 to your computer and use it in GitHub Desktop.
lid suspend
acpid.enable = true;
acpid.lidEventCommands = ''
if [ ! -f /tmp/suspend.lock ]; then
touch /tmp/suspend.lock;
/run/current-system/sw/bin/systemctl suspend;
else
rm /tmp/suspend.lock;
fi
'';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment