niksos/options/desktop/suspend.nix

17 lines
471 B
Nix

{
inputs,
pkgs,
...
}: {
powerManagement = {
enable = true;
powerDownCommands = ''
${pkgs.mpc-cli}/bin/mpc pause
${pkgs.coreutils-full}/bin/sleep 1
'';
powerUpCommands = ''
${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/hyprctl dispatch dpms off HDMI-A-1
${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/hyprctl dispatch dpms on HDMI-A-1
'';
};
}