about summary refs log tree commit diff
path: root/zzz
diff options
context:
space:
mode:
authorRenato Aguiar <contact@renatoaguiar.org>2016-04-18 21:50:56 -0700
committerRenato Aguiar <contact@renatoaguiar.org>2016-04-18 21:59:08 -0700
commit06f34a61b90e96778139492bbc68138b5e6dbf84 (patch)
treecba84ef4d8331a06d7bf958ee7cf8952af1e1dfa /zzz
parent63fc8925ef5d11247784830ba6ba745f50a88eb8 (diff)
downloadrunit-void-06f34a61b90e96778139492bbc68138b5e6dbf84.tar.gz
runit-void-06f34a61b90e96778139492bbc68138b5e6dbf84.tar.xz
runit-void-06f34a61b90e96778139492bbc68138b5e6dbf84.zip
zzz: add suspend-hybrid support
Diffstat (limited to 'zzz')
-rwxr-xr-xzzz6
1 files changed, 4 insertions, 2 deletions
diff --git a/zzz b/zzz
index ff50d28..7d422a1 100755
--- a/zzz
+++ b/zzz
@@ -6,7 +6,8 @@ USAGE="Usage: ${0##*/} [-nSzZR]
    -S   Low-power idle (ACPI S0)
    -z   suspend to RAM (ACPI S3) [DEFAULT for zzz(8)]
    -Z   hibernate to disk & power off (ACPI S4) [DEFAULT for ZZZ(8)]
-   -R   hibernate to disk & reboot"
+   -R   hibernate to disk & reboot
+   -H   hibernate to disk & suspend (aka suspend-hybrid)"
 
 fail() { echo ${0##*/}: 1>&2 "$*"; exit 1; }
 
@@ -17,13 +18,14 @@ case "$0" in
   *ZZZ) ZZZ_MODE=hibernate;;
 esac
 
-while getopts hnSzRZ: opt; do
+while getopts hnSzHRZ: opt; do
   case "$opt" in
     n) ZZZ_MODE=noop;;
     S) ZZZ_MODE=standby;;
     z) ZZZ_MODE=suspend;;
     Z) ZZZ_MODE=hibernate;;
     R) ZZZ_MODE=hibernate; ZZZ_HIBERNATE_MODE=reboot;;
+    H) ZZZ_MODE=hibernate; ZZZ_HIBERNATE_MODE=suspend;;
     [h?]) fail "$USAGE";;
   esac
 done