nixos-config/pkgs/cpypsk.nix

14 lines
274 B
Nix
Raw Normal View History

2024-06-25 12:11:51 +02:00
{ pkgs, pash, ... }:
pkgs.writeScript "cpypsk" ''
#!/bin/sh
D="''${PASH_DIR:-$HOME/.local/share/pash}"
D="''${D%/}"
for f in "$D"/*.gpg; do
n="''${f#$D/}"
n="''${n%.gpg}"
printf '%s\n' "$n"
done | ${pkgs.rofi}/bin/rofi -dmenu | xargs ${pash} copy
''