
HyprCaffeine: A lightweight tool to manage sleep inhibition (with CLI & Waybar support)
Hello everyone,
I wanted to share a small utility I wrote called HyprCaffeine.
Often, when running minimal window managers or Wayland compositors, managing idle states (like preventing the system from sleeping while rendering a video or reading long documentation) requires manually killing hypridle/swayidle or using systemd-inhibit commands.
I wanted a simple, user-friendly alternative similar to Caffeine (Windows) or Amphetamine (macOS).
While it was originally inspired by the Omarchy project, it's designed to be a standalone, simple solution.
- It works purely from the terminal if you want to script it.
- It provides a GUI menu for quick selections (timers, display on, block lid).
- It automatically integrates with Waybar if you happen to use it, creating a status module without complex manual configuration.
It's just a small contribution to make the day-to-day Linux experience a bit smoother. Hopefully, it saves someone some time!
Latest Update (v0.7.4): Added dedicated keybindings for faster workflow:
SUPER + CTRL + I: Toggle infinite idleSUPER + CTRL + SHIFT + I: Show Walker menuSUPER + CTRL + SHIFT + D: Toggle lid behaviorSUPER + CTRL + D: Toggle monitor state
It's just a small contribution to make the day-to-day Linux experience a bit smoother. Hopefully, it saves someone some time!
Source code and installation instructions here: https://github.com/hbuddenberg/hyprcaffeine
📦 Installation
AUR (Arch Linux)
Install from the AUR using your preferred helper:
# Using yay
yay -S hyprcaffeine
# Using paru
paru -S hyprcaffeine
Manual Install
git clone https://github.com/hbuddenberg/hyprcaffeine.git
cd hyprcaffeine
chmod +x install.sh
./install.sh
The installer checks dependencies, installs the binary to ~/.local/bin/, scripts to ~/.local/share/hyprcaffeine/, and creates a default config at ~/.config/hyprcaffeine/config.yaml.
>Note: Make sure ~/.local/bin is in your $PATH:
Uninstall
./install.sh --uninstall
Feedback and contributions are always welcome. Thanks!