A read-only mirror of https://github.com/hyprwm/hypridle
Find a file
Martin Schrodt e24372277c core: add per-listener condition_cmd with retry
Add condition_cmd and condition_retry config options per listener.
When set, condition_cmd is executed before on-timeout fires. Exit 0
proceeds normally, non-zero defers on-timeout and retries every
condition_retry seconds while the user remains idle. User activity
cancels any pending retry.

This allows gating actions (e.g. suspend) on external conditions
like active SSH sessions or running workloads without external
inhibitor daemons.
2026-04-03 02:05:13 +03:00
.github/workflows CI/Nix: add cache-nix-action 2025-06-20 01:24:48 +03:00
assets assets: update example.conf (#137) 2025-03-19 16:14:53 +01:00
nix nix: separate overlay with deps 2026-03-02 16:29:31 +02:00
src core: add per-listener condition_cmd with retry 2026-04-03 02:05:13 +03:00
systemd fix systemd service exec path 2024-04-17 09:35:26 +03:00
.clang-format core: initial commit 2024-02-17 19:30:11 +00:00
.clang-tidy clang-tidy: fix some errors (#143) 2025-04-22 23:23:57 +02:00
.gitignore core: implement hyprlock-lock-notify-v1 functionality (#122) 2025-01-27 14:24:13 +01:00
CMakeLists.txt core: clang-tidy and comp fixes (#126) 2025-02-13 17:55:17 +01:00
flake.lock flake.lock: update 2026-03-02 16:35:47 +02:00
flake.nix nix: separate overlay with deps 2026-03-02 16:29:31 +02:00
LICENSE Initial commit 2024-02-17 17:49:23 +00:00
README.md README: expand build commands 2025-07-10 18:17:31 +02:00
VERSION version: bump to 0.1.7 2025-08-27 12:40:01 +02:00

hypridle

Hyprland's idle daemon

Features

  • based on the ext-idle-notify-v1 wayland protocol
  • support for dbus' loginctl commands (lock / unlock / before-sleep)
  • support for dbus' inhibit (used by e.g. firefox / steam)

Configuration

Configuration is done via ~/.config/hypr/hypridle.conf in the standard hyprland syntax.

general {
    lock_cmd = notify-send "lock!"          # dbus/sysd lock command (loginctl lock-session)
    unlock_cmd = notify-send "unlock!"      # same as above, but unlock
    before_sleep_cmd = notify-send "Zzz"    # command ran before sleep
    after_sleep_cmd = notify-send "Awake!"  # command ran after sleep
    ignore_dbus_inhibit = false             # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
    ignore_systemd_inhibit = false          # whether to ignore systemd-inhibit --what=idle inhibitors
}

listener {
    timeout = 500                            # in seconds
    on-timeout = notify-send "You are idle!" # command to run when timeout has passed
    on-resume = notify-send "Welcome back!"  # command to run when activity is detected after timeout has fired.
}

You can add as many listeners as you please. Omitting on-timeout or on-resume (or leaving them empty) will make those events ignored.

Dependencies

  • wayland
  • wayland-protocols
  • hyprland-protocols
  • hyprlang >= 0.4.0
  • sdbus-c++
  • hyprwayland-scanner

Building & Installation

Building:

cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`

Installation:

sudo cmake --install build

Usage:

Hypridle should ideally be launched after logging in. This can be done by your compositor or by systemd. For example, for Hyprland, use the following in your hyprland.conf.

exec-once = hypridle

If, instead, you want to have systemd do this for you, you'll just need to enable the service using

systemctl --user enable --now hypridle.service

Flags

-c <config_path>, --config <config_path>: specify a config path, by default
                                          set to ${XDG_CONFIG_HOME}/hypr/hypridle.conf
-q, --quiet
-v, --verbose