A simple systray applet to prevent the system from going idle or suspending on demand (including on laptop lid closure).
Run lungo to start the systray applet.
Simply click on the systray applet to toggle it on and off.
The systray icon (first one on the left) automatically changes to reflect the current state ("moon cup" when disabled, "power cup" when enabled):
The state can also be consulted and toggled from the systray applet menu:
Lungo is:
- Simple and minimal by design: No superfluous options and features, no complex background operations.
- Distribution and desktop environment agnostic: Only requires either
systemd-logindorelogind, not tied to any specific graphical / desktop environment. - Crash and memory safe: Uses a
logindfile descriptor lock (which is automatically released by the kernel on crash or kill), written in a memory safe language.
Motivation:
This project is generally inspired by caffeine / caffeine-ng (hence the lungo name, as a reference) with a specific part of the implementation adapted from caffeine-applet (see the THIRD-PARTY-NOTICES.md file for details).
The main motivation was to make a simple and minimal implementation of a "caffeine" systray applet, with no arguably complex or "superfluous" mechanism / features coupled to numerous runtime dependencies (unlike caffeine / caffeine-ng), and that isn't tied to a specific desktop / graphical environment (unlike caffeine-applet or the caffeine gnome shell extension).
systemd-logind or elogind up and running.
A (statically linked) pre-compiled binary for the x86_64 (amd64) architecture is distributed as a release asset (lungo-<release_version>-x86_64).
Note that you at least additionally need the icons to be installed on your system for the systray applet to work properly, see the next chapter for more details.
The pre-compiled binary can be reproduced from source (in the sense of reproducible builds).
The build environment is created and fully documented via repro-env, and is tracked in this repository.
To reproduce the pre-compiled binary for a given release, install repro-env and run the following:
git clone https://github.com/Antiz96/lungo.git
cd lungo
git checkout <tag> # Where <tag> is the git tag for the targeted release, e.g. "v1.0.0"
repro-env build -- cargo build --release --target x86_64-unknown-linux-musl
sha256sum target/x86_64-unknown-linux-musl/release/lungoThen, compare the sha256 hash of the built binary to the one of the pre-compiled release binary (which is also recorded in the lungo-<release_version>-x86_64.sha256 file in the release assets). Both hashes should be equal, indicating that the binary has been successfully reproduced.
Each release assets are also cryptographically signed, with the detached signature for each asset distributed as <asset_name>.asc (see the MAINTAINERS.md file for a list of keys expected to emit signatures).
git clone https://github.com/Antiz96/lungo.git
cd lungo
cargo build --releaseThe built binary will be located at ./target/release/lungo, place it somewhere in your $PATH.
Place the icons from the res/icons/ directory in an "icon compliant" folder on the system (such as ~/.icons/lungo/, ~/.local/share/icons/lungo/ or /usr/share/icons/lungo/, create it if needed).
For packaging, using the hicolor-icon-theme folder (e.g. /usr/share/icons/hicolor/scalable/apps/) is an option.
A .desktop file is available in the res/desktop/ directory, allowing to automatically start the systray applet at boot via XDG Autostart (by placing it either in ~/.config/autostart/ or /etc/xdg/autostart/).
The man page can be generated with scdoc:
scdoc < doc/man/lungo.1.scd > doc/man/lungo.1There are also shell completions available in the res/completions/ directory.
Run lungo to start the systray applet.
To start it automatically at boot, place the .desktop file in ~/.config/autostart/ or /etc/xdg/autostart/ (see XDG Autostart). Alternatively, if your graphical environment doesn't support XDG Autostart, add the lungo command to your environment's auto-start method.
Simply click on the systray applet to toggle it on and off.
The systray icon (first one on the left) automatically changes to reflect the current state ("moon cup" when disabled, "power cup" when enabled):
The state can also be consulted and toggled from the systray applet menu:
See lungo --help and the lungo(1) man page.
See the contributing guidelines.
Lungo is licensed under the GPL-3.0 license (or any later version of that license).



