Skip to content

Instantly share code, notes, and snippets.

@geraintwhite
Created June 14, 2014 15:44
Show Gist options
  • Save geraintwhite/6f7d1c1959b818eae6a0 to your computer and use it in GitHub Desktop.
Save geraintwhite/6f7d1c1959b818eae6a0 to your computer and use it in GitHub Desktop.
Script to suspend the system. I use with keyboard shortcut ctrl-alt-backspace. Works with my NFC screen unlock (https://gist.github.com/grit96/11268473).
#!/bin/bash
# Trigger my NFC unlock to lock the computer
curl http://localhost:6001/?secret=secret
# Send standby signal
dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment