From 4c55551353bb57a2fa8f25be0f6109fc324546dd Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 17 Aug 2024 13:18:49 +0200 Subject: ... --- accounts/gkleen@sif/default.nix | 57 +++--------------------------- accounts/gkleen@sif/hyprland.nix | 2 ++ accounts/gkleen@sif/systemd.nix | 76 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 81 insertions(+), 54 deletions(-) diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 47d2212b..e6cbd77d 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -88,55 +88,7 @@ let exec -a "$1" "$@" ''; - lockCommand = pkgs.writeShellScript "gtklock" '' - set -x - - export PATH="${lib.makeBinPath [cfg.programs.wpaperd.package pkgs.jq pkgs.coreutils pkgs.gtklock pkgs.imagemagick pkgs.findutils pkgs.libsForQt5.qt5.qttools pkgs.systemd]}:$PATH" - - qdbus org.keepassxc.KeePassXC.MainWindow /keepassxc org.keepassxc.KeePassXC.MainWindow.lockAllDatabases - systemctl --user --no-block stop gpg-agent.service - - tmpDir=$(mktemp -d --tmpdir="$RUNTIME_DIRECTORY" "gtklock.$(date -uIs).XXXXXXXX") - - args=() - - cp --no-preserve=mode ${pkgs.writeText "gtklock.css" '' - #window-box { - padding: 64px; - /* border: 1px solid black; */ - border-radius: 4px; - box-shadow: rgba(0, 0, 0, 0.8) 0px 4px 12px; - /* background-color: white; */ - background-color: rgba(0, 0, 0, 0.5); - } - ''} "$tmpDir"/style.css - - monitors=() - while IFS= read -r entry; do - path=$(jq -r ".path" <<<"$entry") - [[ -z "$path" || ! -f "$path" ]] && continue - display=$(jq -r ".display" <<<"$entry") - monitors+=("$display") - # ln -s "$path" "$tmpDir"/"$display"."''${path##*.}" - magick "$path" -filter Gaussian -resize 6.25% -define filter:sigma=2.5 -resize 1600% "$tmpDir"/"$display"."''${path##*.}" & - done < <(wpaperctl all-wallpapers -j | jq -c ".[]") - wait - for monitor in "''${monitors[@]}"; do - path=$(find "$tmpDir" -name "$monitor"'.*') - cat >>"$tmpDir"/style.css <>"$RUNTIME_DIRECTORY"/style.css <