diff --git a/home/fuji/home.nix b/home/fuji/home.nix index c05f014..b14c2c3 100644 --- a/home/fuji/home.nix +++ b/home/fuji/home.nix @@ -274,35 +274,32 @@ 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" + ${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 - ${pkgs.coreutils}/bin/shred $ALL_IMGS - ${pkgs.coreutils}/bin/rm $ALL_IMGS + ${lib.getExe inputs.att_lock.packages.${system}.default} -i $ALL_IMGS + ${pkgs.coreutils}/bin/shred $ALL_IMGS + ${pkgs.coreutils}/bin/rm $ALL_IMGS ''; 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"; } ]; };