A read-only mirror of https://github.com/hyprwm/hypridle
Go to file
Jan Beich 790988d116
core: Catch sdbus-cpp exception to print better error (#19)
$ hypridle
[...]
[LOG] wayland done, registering dbus
Abort
2024-02-27 13:07:22 +00:00
.github/workflows CI: init 2024-02-17 23:14:09 +02:00
nix nix: add default empty list for listeners option 2024-02-22 01:00:30 +02:00
src core: Catch sdbus-cpp exception to print better error (#19) 2024-02-27 13:07:22 +00:00
.clang-format core: initial commit 2024-02-17 19:30:11 +00:00
.gitignore core: initial commit 2024-02-17 19:30:11 +00:00
CMakeLists.txt cmake: further expand version 2024-02-17 23:40:04 +00:00
LICENSE Initial commit 2024-02-17 17:49:23 +00:00
README.md dbus: handle before/after sleep in PrepareForSleep 2024-02-17 23:48:54 +00:00
flake.lock flake.lock: update nixpkgs 2024-02-24 17:13:26 +02:00
flake.nix nix: init home-manager module 2024-02-18 00:22:10 +02:00

README.md

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)
}

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
  • hyprlang >= 0.4.0
  • sdbus-c++

Building & Installation

Building:

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

Installation:

sudo cmake --install build