Skip to content

Instantly share code, notes, and snippets.

@grit96 grit96/suspend.sh

Created Jun 14, 2014
Embed
What would you like to do?
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
You can’t perform that action at this time.