add seemingly broken post suspend script

it was supposed to fix my external monitor not working :-(
This commit is contained in:
jacekpoz 2024-02-14 15:16:06 +01:00
parent db05e8d3d8
commit a2891699f4
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C

View file

@ -337,9 +337,26 @@
wantedBy = [ "sleep.target" ];
};
#"resume@" = {
#
#};
"resume@" = {
description = "Unit resume actions";
after = [ "suspend.target" ];
serviceConfig = {
User = "%I";
Type = "forking";
};
environment = {
DISPLAY = ":0";
};
script = ''
${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
'';
wantedBy = [ "sleep.target" ];
};
};
# this makes usb devices autosuspend