u/hbuddenberg

HyprCaffeine: A lightweight tool to manage sleep inhibition (with CLI & Waybar support)

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 idle
  • SUPER + CTRL + SHIFT + I: Show Walker menu
  • SUPER + CTRL + SHIFT + D: Toggle lid behavior
  • SUPER + 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!

u/hbuddenberg — 3 days ago
▲ 180 r/hyprland+1 crossposts

[HyprCaffeine] A little contribution inspired by Omarchy to keep your system awake ☕

Hey everyone! 👋

I wanted to share a small project I've been working on. As a big fan of the Omarchy project (kudos to the developer!), I was highly inspired by its philosophy of keeping things simple, aesthetic, and functional.

It’s called HyprCaffeine: a simple solution to keep your system awake (preventing sleep/suspend), similar to what Caffeine does on Windows or Amphetamine on Mac.

I know that in the Omarchy setup, you can already toggle this easily (like using SUPER + ALT + SPACE or a simple command), but I wanted to take it a step further. The cool thing about HyprCaffeine is that it automatically integrates into Waybar if it detects it, and it gives you a really clean UI menu to set specific timers (15m, 1h, infinite, block lid, etc.).

It works flawlessly from both the terminal and the Waybar module!

This is just a little contribution to make the Linux desktop experience a bit more pleasant and out-of-the-box. I hope some of you find it useful for your setups!

UPDATE: Updated to version 0.7.4! It now handles keybindings, replacing the original ones with:

  • SUPER + CTRL + I: Toggle infinite idle (hyprcaffeine toggle)
  • SUPER + CTRL + SHIFT + I: Show Walker menu (hyprcaffeine menu)
  • SUPER + CTRL + SHIFT + D: Toggle lid (hyprcaffeine lid toggle)
  • SUPER + CTRL + D: Toggle monitor (hyprcaffeine monitor toggle)

This way it integrates perfectly with Omarchy or any other Hyprland system! ;)

Repo: https://github.com/hbuddenberg/hyprcaffeine

Let me know what you think! 🐧💙

📦 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

¡Cuéntame qué te parece! 🐧💙

u/hbuddenberg — 3 days ago