nix-config/home/hyprland/hypridle.nix
2025-04-08 22:59:34 +02:00

35 lines
954 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ pkgs, ... }:
{
# Hyprland and related packages
home.packages = with pkgs; [
hypridle
];
# Hypridle configuration
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
before_sleep_cmd = ''notify-send -u critical "Hey master, Im getting sleepy Ill see you in my code dreams 💖" --icon
="$HOME/.config/hypr/avatar.png" --app-name="Hyprlock"'';
};
listener = [
{
timeout = 300;
on-timeout = "hyprlock";
}
{
timeout = 600;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
}