mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-14 13:19:09 +02:00
19 lines
428 B
Nix
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"
|
|
'';
|
|
}
|