GithubHelp home page GithubHelp logo

zzz's Introduction

Zzz…

Binaries Workflow Packaging status

A simple program to suspend or hibernate your computer. It supports hooks before and after suspending.

Refer to 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)

  • GNU Make

  • Asciidoctor (for building man pages)

Installation

On Alpine Linux

Install package zzz on Alpine Linux v3.15 or later:

apk add zzz

On Arch Linux

Install package zzz from AUR:

yay -S zzz

Or use another AUR helper.

Using Pre-Built Binary

  1. Download and extract release tarball for your CPU architecture (pick the right link from the list above):

    curl -sSLO https://github.com/jirutka/zzz/releases/download/v0.1.1/zzz-0.1.1-x86_64-unknown-linux.tar.gz
    curl -sSL https://github.com/jirutka/zzz/releases/download/v0.1.1/checksums.txt | sha256sum -c --ignore-missing
    tar -xzf zzz-0.1.1-*.tar.gz
  2. Install zzz somewhere on your PATH, e.g. /usr/local/bin:

    install -m 755 zzz-0.1.1-*/zzz /usr/local/bin/

All binaries are statically linked with musl libc, so they work on every Linux system (distro) regardless of used libc.

From Source Tarball

wget https://github.com/jirutka/zzz/archive/v0.1.1/zzz-0.1.1.tar.gz
tar -xzf zzz-0.1.1.tar.gz
cd zzz-0.1.1

make build
make install DESTDIR=/ prefix=/usr/local

Credits

This program is inspired from zzz(8) (source) in Void Linux written by Leah Neukirchen.

License

This project is licensed under MIT License. For the full text of the license, see the LICENSE file.

zzz's People

Contributors

jirutka avatar vaygr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zzz's Issues

unable to start locker 'quickly' enough after resume

I have a script that runs a locker (swaylock) on resume, and the entire desktop (sway) is visible on resume for ~0.5 seconds or so before the locker app kicks in. I'm not sure if this is a zzz 'problem' or something else...

I've tried running the locker app both ways:

case $1/$2 in
        pre/*)
                sudo -u user WAYLAND_DISPLAY=wayland-1 XDG_RUNTIME_DIR=/run/user/1000 swaylock -c 000000 &
                ;;
esac

and:

case $1/$2 in
        post/*)
                sudo -u user WAYLAND_DISPLAY=wayland-1 XDG_RUNTIME_DIR=/run/user/1000 swaylock -c 000000
                ;;
esac

Do you know of some better way to handle this that doesn't result in the desktop being visible on resume?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.