Hyprland is brilliant.Your screen sleepingduring a 20-minute compilationis infuriating.

INIT_SEQv1.0.0DEPLOY CAFFEINE MODESRC_CODEGITHUBGITHUB
ERR_01

The Issue

Standard idle inhibitors fail to recognize long-running background tasks, watching videos, or reading documentation, causing the display manager to power down the screen prematurely.

SYS_02

The Solution

A deep system-level integration with Hyprland and Waybar that provides deterministic, persistent idle inhibition precisely when you require it, without draining battery when you don't.

OPT_03

The Architecture

Engineered purely in Bash and Systemd. No heavy background daemons, no memory leaks. Just pure, precise execution.

Core Specifications

FEAT_A

Waybar Integration

A custom Waybar module that displays the current inhibition state with absolute clarity. One click to toggle.

FEAT_B

Systemd Orchestration

Managed via standard systemd user services for reliable startup, dependency management, and robust lifecycle control.

The Waybar Dilemma

Why not just use Waybar's built-in idle_inhibitor module?

CRASH_VULN

Volatile State

If Waybar crashes or you reload your theme, the built-in module resets to its default (inactive) state. Your session is suddenly unprotected, and you receive no warning.

ISO_STATE

Isolated Context

The built-in toggle is purely internal to Waybar. You cannot bind a Hyprland keyboard shortcut to toggle it, nor can external scripts read its current status.

SOLUTION

Single Source of Truth

Caffeine Mode solves this by moving the state into a systemd --user service. Waybar, keybinds, and scripts all read from and write to the exact same persistent state.

System Integration

Hyprland Keybind

Toggle caffeine mode instantly via your keyboard. State syncs automatically to Waybar.

bash
# ~/.config/hypr/hyprland.conf
bind = $mainMod, C, exec, CAFFEINE_WAYBAR_SIGNAL=20 ~/.local/bin/idle-inhibitor-toggle.sh toggle

Hypridle Compatibility

Ensure Hypridle respects systemd inhibition locks for flawless operation.

bash
# ~/.config/hypr/hypridle.conf
general {
    ignore_systemd_inhibit = false
}

Deployment Protocol

Clone the repository and execute the installation script. The core infrastructure resides in the root directory, ensuring maximum compatibility with standard Hyprland configurations.

bash
git clone https://github.com/kitsunekode/hyprland-caffeine-mode.git
cd hyprland-caffeine-mode

# Execute the deployment sequence
chmod +x install.sh
./install.sh