hyprland: handle locked dpsm with swayidle
This commit is contained in:
parent
f1b07c85f2
commit
efaeab06be
@ -63,11 +63,11 @@ in
|
|||||||
onTimeout = cfg.commands.dpms-off;
|
onTimeout = cfg.commands.dpms-off;
|
||||||
onResume = cfg.commands.dpms-on;
|
onResume = cfg.commands.dpms-on;
|
||||||
}
|
}
|
||||||
{
|
# {
|
||||||
timeout = cfg.timeouts.locked-dpms;
|
# timeout = cfg.timeouts.locked-dpms;
|
||||||
onTimeout = "${lock-dpms}";
|
# onTimeout = "${lock-dpms}";
|
||||||
onResume = cfg.commands.dpms-on;
|
# onResume = cfg.commands.dpms-on;
|
||||||
}
|
# }
|
||||||
{
|
{
|
||||||
timeout = cfg.timeouts.lock;
|
timeout = cfg.timeouts.lock;
|
||||||
onTimeout = "${lock}";
|
onTimeout = "${lock}";
|
||||||
|
@ -33,7 +33,11 @@ let
|
|||||||
# idle-cmd = "${swayidle} -w timeout 315 '${lock-cmd}' timeout 300 '${hyprctl} dispatch dpms off' resume '${hyprctl} dispatch dpms on' before-sleep '${lock-cmd}' lock '${lock-cmd}' unlock '${pkill} -USR1 -x swaylock'";
|
# idle-cmd = "${swayidle} -w timeout 315 '${lock-cmd}' timeout 300 '${hyprctl} dispatch dpms off' resume '${hyprctl} dispatch dpms on' before-sleep '${lock-cmd}' lock '${lock-cmd}' unlock '${pkill} -USR1 -x swaylock'";
|
||||||
# idle-cmd = "${swayidle} -w timeout 300 '${hyprctl} dispatch dpms off' resume '${hyprctl} dispatch dpms on'";
|
# idle-cmd = "${swayidle} -w timeout 300 '${hyprctl} dispatch dpms off' resume '${hyprctl} dispatch dpms on'";
|
||||||
# idle-cmd = "${hypridle}";
|
# idle-cmd = "${hypridle}";
|
||||||
idle-cmd = "${pkgs.coreutils}/bin/true";
|
# idle-cmd = "${pkgs.coreutils}/bin/true";
|
||||||
|
idle-cmd = pkgs.writeShellScript "idle-dpms-lock" ''
|
||||||
|
${swayidle} timeout 10 'pgrep -x swaylock > /dev/null && hyprctl dispatch dpms off' \
|
||||||
|
resume 'hyprctl dispatch dpms on'
|
||||||
|
'';
|
||||||
|
|
||||||
hypr-dispatcher-package = pkgs.callPackage ./dispatcher { hyprland = hyprland-pkg; };
|
hypr-dispatcher-package = pkgs.callPackage ./dispatcher { hyprland = hyprland-pkg; };
|
||||||
hypr-dispatcher = "${hypr-dispatcher-package}/bin/hypr-dispatcher";
|
hypr-dispatcher = "${hypr-dispatcher-package}/bin/hypr-dispatcher";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user