diff options
-rwxr-xr-x | zzz | 6 | ||||
-rw-r--r-- | zzz.8 | 7 |
2 files changed, 9 insertions, 4 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 diff --git a/zzz.8 b/zzz.8 index 4f56fa6..41ed105 100644 --- a/zzz.8 +++ b/zzz.8 @@ -7,9 +7,9 @@ .Nd suspend or hibernate your computer .Sh SYNOPSIS .Nm zzz -.Op Fl nSzZR +.Op Fl nSzZRH .Nm ZZZ -.Op Fl nSzZR +.Op Fl nSzZRH .Sh DESCRIPTION .Nm is a simple script to suspend or hibernate your computer. @@ -33,6 +33,9 @@ This is the default for .It Fl R Enter hibernate to disk mode and reboot. This can be used to switch operating systems. +.It Fl H +Enter hibernate to disk mode and suspend. +This is also know as suspend-hybrid. .El .Sh FILES Before suspending, |