.dotfiles/pkgs/flake/quickpass/default.nix
2026-03-06 00:51:55 +01:00

19 lines
428 B
Nix

{ name, writeShellApplication, libnotify, pass, wtype, ... }:
writeShellApplication {
inherit name;
runtimeInputs = [ libnotify pass wtype ];
text = ''
shopt -s nullglob globstar
notify-send "$(env | grep -E 'WAYLAND|SWAY')"
password="$1"
pass show "$password" | {
IFS= read -r pass
printf %s "$pass"
} | wtype -
notify-send -u critical -a pass -t 1000 "Typed Password"
'';
}