home/natto: add hyprlock,hypridle and hyprpaper
also move hyprland.conf -> hyprland.nix Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
29
home/natto/hypridle.nix
Normal file
29
home/natto/hypridle.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
lock = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||
timeout = 300;
|
||||
in
|
||||
{
|
||||
# screen idle
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
before_sleep_cmd = lock;
|
||||
lock_cmd = "pgrep hyprlock || ${config.programs.hyprlock.package}/bin/hyprlock";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = timeout;
|
||||
on-timeout = lock;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user