mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-04 20:02:10 +02:00
@@ -1,23 +1,21 @@
|
||||
{ config, pkgs, ... }: {
|
||||
home.packages = with pkgs; [ hypridle ];
|
||||
{ pkgs, ... }: {
|
||||
|
||||
xdg.configFile."hypr/hypridle.conf".text = ''
|
||||
general {
|
||||
ignore_dbus_inhibit = false
|
||||
}
|
||||
|
||||
# Screenlock
|
||||
listener {
|
||||
timeout = 600
|
||||
on-timeout = ${pkgs.hyprlock}/bin/hyprlock
|
||||
on-resume = ${pkgs.libnotify}/bin/notify-send "Welcome back ${config.home.username}!"
|
||||
}
|
||||
|
||||
# Suspend (not working on my laptop)
|
||||
#listener {
|
||||
# timeout = 660
|
||||
# on-timeout = systemctl suspend
|
||||
# on-resume = ${pkgs.libnotify}/bin/notify-send "Welcome back to your desktop!"
|
||||
#}
|
||||
'';
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = { ignore_dbus_inhibit = false; };
|
||||
listener = [
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = pkgs.hyprlock + "/bin/hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 660;
|
||||
on-timeout = "systemctl suspend";
|
||||
on-resume = pkgs.libnotify
|
||||
+ "/bin/notify-send 'Welcome back to your desktop!'";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user