Added small timeout after locking
This commit is contained in:
parent
ca216ad1dc
commit
2ae9f5ae43
1 changed files with 1 additions and 2 deletions
|
|
@ -5,7 +5,6 @@ suspendScript = pkgs.writeShellScript "suspend-script" ''
|
||||||
${lib.getExe pkgs.playerctl} -a status | ${lib.getExe pkgs.ripgrep} Playing -q
|
${lib.getExe pkgs.playerctl} -a status | ${lib.getExe pkgs.ripgrep} Playing -q
|
||||||
# only suspend if nothing is playing
|
# only suspend if nothing is playing
|
||||||
if [ $? == 1 ]; then
|
if [ $? == 1 ]; then
|
||||||
#loginctl lock-session
|
|
||||||
${pkgs.systemd}/bin/systemctl suspend
|
${pkgs.systemd}/bin/systemctl suspend
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
@ -18,7 +17,7 @@ services.hypridle = {
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
lock_cmd="pidof hyprlock || hyprlock";
|
lock_cmd="pidof hyprlock || hyprlock";
|
||||||
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
|
before_sleep_cmd = "loginctl lock-session && sleep 3s"; # lock before suspend.
|
||||||
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
||||||
ignore_dbus_inhibit = false;
|
ignore_dbus_inhibit = false;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue