fix swaylock
This commit is contained in:
parent
ada2508010
commit
9b8ae4400b
|
@ -10,7 +10,7 @@ let
|
||||||
notify-send "$(wl-paste)" "Copied to clipboard"
|
notify-send "$(wl-paste)" "Copied to clipboard"
|
||||||
'';
|
'';
|
||||||
_lock = pkgs.writeShellScriptBin "_lock" ''
|
_lock = pkgs.writeShellScriptBin "_lock" ''
|
||||||
swaylock -f
|
${pkgs.swaylock}/bin/swaylock -f
|
||||||
systemctl --user start swayidle.service
|
systemctl --user start swayidle.service
|
||||||
'';
|
'';
|
||||||
_suspend = pkgs.writeShellScriptBin "_suspend" ''
|
_suspend = pkgs.writeShellScriptBin "_suspend" ''
|
||||||
|
@ -307,19 +307,19 @@ in {
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{
|
{
|
||||||
timeout = 360;
|
timeout = 360;
|
||||||
command = "swaylock -f";
|
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
timeout = 1800;
|
timeout = 1800;
|
||||||
command = ''
|
command = ''
|
||||||
mpc status | grep "^[playing]" > /dev/null || swaymsg "output * dpms off"'';
|
mpc status | grep "^[playing]" > /dev/null || ${pkgs.sway}/bin/swaymsg "output * dpms off"'';
|
||||||
resumeCommand = ''swaymsg "output * dpms on"'';
|
resumeCommand = ''${pkgs.sway}/bin/swaymsg "output * dpms on"'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
events = [
|
events = [
|
||||||
{
|
{
|
||||||
event = "before-sleep";
|
event = "before-sleep";
|
||||||
command = "swaylock -f";
|
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
event = "after-resume";
|
event = "after-resume";
|
||||||
|
|
Loading…
Reference in a new issue