home/fuji: switch screen locker
This commit is contained in:
+7
-10
@@ -274,18 +274,18 @@ in
|
||||
|
||||
swayidle =
|
||||
let
|
||||
locker = pkgs.writeShellScriptBin "swaylock_fancy" ''
|
||||
att_lock = pkgs.writeShellScriptBin "att_lock" ''
|
||||
ALL_IMGS=""
|
||||
LOCK_ARGS=""
|
||||
for OUTPUT in $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[].name')
|
||||
for OUTPUT in $( ${inputs.att_wm.packages.${system}.default}/bin/att_wmctl state | ${lib.getExe pkgs.jq} -r '.outputs[].name')
|
||||
do
|
||||
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
|
||||
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.png)
|
||||
${lib.getExe pkgs.grim} -t ppm -o $OUTPUT - | \
|
||||
${lib.getExe pkgs.ffmpeg} -y -loglevel 0 -i - -vframes 1 -vf "boxblur=10" "$TMP_FILE"
|
||||
LOCK_ARGS="$LOCK_ARGS --image $OUTPUT:$TMP_FILE"
|
||||
ALL_IMGS="$ALL_IMGS $TMP_FILE"
|
||||
done
|
||||
${lib.getExe pkgs.swaylock} -f $LOCK_ARGS
|
||||
${lib.getExe inputs.att_lock.packages.${system}.default} -i $ALL_IMGS
|
||||
${pkgs.coreutils}/bin/shred $ALL_IMGS
|
||||
${pkgs.coreutils}/bin/rm $ALL_IMGS
|
||||
'';
|
||||
@@ -293,16 +293,13 @@ in
|
||||
{
|
||||
enable = true;
|
||||
events = {
|
||||
before-sleep = "${locker}/bin/swaylock_fancy";
|
||||
lock = "${locker}/bin/swaylock_fancy";
|
||||
/*
|
||||
after-resume = "${refresh_i3status}/bin/refresh_i3status";
|
||||
*/
|
||||
before-sleep = "${att_lock}/bin/att_lock";
|
||||
lock = "${att_lock}/bin/att_lock";
|
||||
};
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 15 * 60;
|
||||
command = "${locker}/bin/swaylock_fancy";
|
||||
command = "${att_lock}/bin/att_lock";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user