mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-21 18:21:31 +02:00
hyprland: Use home-manager module for hypridle
This commit is contained in:
parent
f80d3c356d
commit
1462c868b6
6
flake.lock
generated
6
flake.lock
generated
@ -170,11 +170,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714377222,
|
||||
"narHash": "sha256-UsDsjWCKlWn8vbXi8Zza9Hkq3xyk8fpvFNo2VM5S74E=",
|
||||
"lastModified": 1716908526,
|
||||
"narHash": "sha256-Zl6e/sEVDh07K47XxDGPsXTYT4nI6llUDbQ4xMIwp7k=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2af7c78b7bb9cf18406a193eba13ef9f99388f49",
|
||||
"rev": "373ead20606efa9181cd15ba19a5deac7ead1492",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -19,7 +19,6 @@ in
|
||||
home.packages = with pkgs; [
|
||||
hyprdim
|
||||
hyprnome
|
||||
hypridle
|
||||
hyprlock
|
||||
hyprshade
|
||||
swww
|
||||
@ -73,7 +72,6 @@ in
|
||||
"hyprctl dispatch workspace 5000000"
|
||||
"${polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
||||
"hyprdim --no-dim-when-only --persist --ignore-leaving-special --dialog-dim"
|
||||
"hypridle"
|
||||
"sleep 1 && eww open desktop-icons"
|
||||
"~/.config/${randomBackgroundScript}"
|
||||
];
|
||||
@ -389,33 +387,36 @@ in
|
||||
}
|
||||
'';
|
||||
|
||||
xdg.configFile."hypr/hypridle.conf".text = /* bash */ ''
|
||||
general {
|
||||
lock_cmd = pidof hyprlock || hyprlock
|
||||
before_sleep_cmd = loginctl lock-session
|
||||
after_sleep_cmd = hyprctl dispatch dpms on
|
||||
}
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
|
||||
listener {
|
||||
timeout = 150
|
||||
on-timeout = brightnessctl -s set 10
|
||||
on-resume = brightnessctl -r
|
||||
}
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener {
|
||||
timeout = 300
|
||||
on-timeout = loginctl lock-session
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 380
|
||||
on-timeout = hyprctl dispatch dpms off
|
||||
on-resume = hyprctl dispatch dpms on
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 1800
|
||||
on-timeout = systemctl suspend
|
||||
}
|
||||
'';
|
||||
listener = [
|
||||
{
|
||||
timeout = 150;
|
||||
on-timeout = "brightnessctl -s set 10";
|
||||
on-resume = "brightnessctl -r";
|
||||
}
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 380;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 1800;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user