https://github.com/jirutka/zzz
A simple program to suspend or hibernate your computer 💤
https://github.com/jirutka/zzz
alpine-linux linux suspend
Last synced: 9 months ago
JSON representation
A simple program to suspend or hibernate your computer 💤
- Host: GitHub
- URL: https://github.com/jirutka/zzz
- Owner: jirutka
- License: mit
- Created: 2021-08-29T01:07:15.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-15T14:43:25.000Z (almost 2 years ago)
- Last Synced: 2025-06-08T20:35:00.453Z (about 1 year ago)
- Topics: alpine-linux, linux, suspend
- Language: C
- Homepage:
- Size: 35.2 KB
- Stars: 27
- Watchers: 4
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= Zzz…
:proj-name: zzz
:version: 0.2.0
:gh-name: jirutka/{proj-name}
:repology-name: zzz-jirutka
:releases-uri: https://github.com/{gh-name}/releases/download/v{version}
ifdef::env-github[]
image:https://github.com/{gh-name}/workflows/CI/badge.svg[Binaries Workflow, link=https://github.com/{gh-name}/actions?query=workflow%3A%22CI%22]
image:https://repology.org/badge/tiny-repos/{repology-name}.svg[Packaging status, link=https://repology.org/project/{repology-name}]
endif::env-github[]
A simple program to suspend or hibernate your computer.
It supports hooks before and after suspending.
Refer to link:zzz.8.adoc[zzz(8)] for usage information.
== Requirements
.*Runtime*:
* Linux system with `/sys/power/state` and optionally `/sys/power/disk`
.*Build*:
* C compiler and linker supporting at least C99 (tested with clang and gcc)
* https://www.gnu.org/software/make/[GNU Make]
* http://asciidoctor.org/[Asciidoctor] (for building man pages)
== Installation
=== On Alpine Linux
Install package https://pkgs.alpinelinux.org/packages?name={proj-name}[{proj-name}] on Alpine Linux v3.15 or later:
[source, sh, subs="+attributes"]
apk add {proj-name}
=== On Arch Linux
Install package https://aur.archlinux.org/packages/{proj-name}[{proj-name}] from AUR:
[source, sh, subs="+attributes"]
yay -S {proj-name}
Or use another AUR helper.
=== Using Pre-Built Binary
{releases-uri}/{proj-name}-{version}-x86_64-unknown-linux.tar.gz[[x86_64]]
{releases-uri}/{proj-name}-{version}-aarch64-unknown-linux.tar.gz[[aarch64]]
{releases-uri}/{proj-name}-{version}-armv7-unknown-linux.tar.gz[[armv7]]
{releases-uri}/{proj-name}-{version}-ppc64le-unknown-linux.tar.gz[[ppc64le]]
{releases-uri}/{proj-name}-{version}-riscv64-unknown-linux.tar.gz[[riscv64]]
. Download and extract release tarball for your CPU architecture (pick the right link from the list above):
+
[source, sh, subs="verbatim, attributes"]
----
curl -sSLO {releases-uri}/{proj-name}-{version}-x86_64-unknown-linux.tar.gz
curl -sSL {releases-uri}/checksums.txt | sha256sum -c --ignore-missing
tar -xzf {proj-name}-{version}-*.tar.gz
----
. Install `{proj-name}` somewhere on your `PATH`, e.g. `/usr/local/bin`:
+
[source, sh, subs="verbatim, attributes"]
install -m 755 {proj-name}-{version}-*/{proj-name} /usr/local/bin/
All binaries are statically linked with http://www.musl-libc.org/[musl libc], so they work on every Linux system (distro) regardless of used libc.
=== From Source Tarball
[source, sh, subs="+attributes"]
----
wget https://github.com/{gh-name}/archive/v{version}/{proj-name}-{version}.tar.gz
tar -xzf {proj-name}-{version}.tar.gz
cd {proj-name}-{version}
make build
make install DESTDIR=/ prefix=/usr/local
----
== Credits
This program is inspired from https://man.voidlinux.org/zzz.8[zzz(8)] (https://github.com/void-linux/void-runit/blob/master/zzz[source]) in Void Linux written by Leah Neukirchen.
== License
This project is licensed under http://opensource.org/licenses/MIT/[MIT License].
For the full text of the license, see the link:LICENSE[LICENSE] file.