home/swayidle: switch swaylock for swaylock_fancy script
This commit is contained in:
parent
ee50755eea
commit
08b97f204f
@ -208,26 +208,33 @@ with lib; {
|
||||
pinentryFlavor = "curses";
|
||||
};
|
||||
|
||||
swayidle = {
|
||||
swayidle = let
|
||||
locker = pkgs.writeShellScriptBin "swaylock_fancy" ''
|
||||
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
|
||||
${pkgs.grim}/bin/grim -t ppm - | ${pkgs.imagemagick}/bin/convert - -blur 0x12 "$TMP_FILE"
|
||||
${pkgs.swaylock}/bin/swaylock -f -i "$TMP_FILE"
|
||||
${pkgs.coreutils}/bin/rm "$TMP_FILE"
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${pkgs.swaylock}/bin/swaylock";
|
||||
command = "${locker}/bin/swaylock_fancy";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${pkgs.swaylock}/bin/swaylock";
|
||||
command = "${locker}/bin/swaylock_fancy";
|
||||
}
|
||||
{
|
||||
event = "after-resume";
|
||||
command = "${procps.pkill}/bin/pkill -USR1 i3status-rs";
|
||||
command = "${pkgs.procps}/bin/pkill -USR1 i3status-rs";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 15 * 60;
|
||||
command = "${pkgs.swaylock}/bin/swaylock";
|
||||
command = "${locker}/bin/swaylock_fancy";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user