24 lines
542 B
Nix
24 lines
542 B
Nix
{
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
inherit (lib.meta) getExe getExe';
|
|
|
|
mpc = getExe pkgs.mpc-cli;
|
|
sleep = getExe' pkgs.coreutils-full "sleep";
|
|
hyprctl = getExe' inputs.hyprland.packages.${pkgs.system}.hyprland "hyprctl";
|
|
in {
|
|
powerManagement = {
|
|
enable = true;
|
|
powerDownCommands = ''
|
|
${mpc} pause
|
|
${sleep} 1
|
|
'';
|
|
powerUpCommands = ''
|
|
${hyprctl} dispatch dpms off HDMI-A-1
|
|
${hyprctl} dispatch dpms on HDMI-A-1
|
|
'';
|
|
};
|
|
}
|