diff options
| author | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-07-07 16:41:25 -0400 |
|---|---|---|
| committer | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-07-07 16:41:25 -0400 |
| commit | 0598d3ec7273f043f41ab6d044fb5679682e8554 (patch) | |
| tree | f6a187c9e7744b17d919c52ff4f9ae24c9769ef5 /modules/gpg/pinentry.sh | |
| parent | fdc2cdd7f09cdad636d7e87eda808a4d554dee8e (diff) | |
| download | home-0598d3ec7273f043f41ab6d044fb5679682e8554.tar.gz | |
modules/gpg(wip): add pinentry script
Diffstat (limited to 'modules/gpg/pinentry.sh')
| -rwxr-xr-x | modules/gpg/pinentry.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/gpg/pinentry.sh b/modules/gpg/pinentry.sh new file mode 100755 index 0000000..90a7112 --- /dev/null +++ b/modules/gpg/pinentry.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +echo "OK its time to enter ur password or something" + +while read stdin; do + case $stdin in + *BYE*) exit 0 ;; + *SETDESC*) KEYNAME=''${stdin#*:%0A%22}; KEYNAME=''${KEYNAME%\%22\%0A*}; KEYID=''${stdin#*ID }; KEYID=''${KEYID%,*}; echo OK ;; + *GETPIN*) echo "D `fuzzel --dmenu --password=• -l 0 --layer=overlay --width=100 --anchor=top --font=monospace --prompt="password for ''${KEYNAME} > "`"; echo OK;; + *SETERROR*) notify-send "''${stdin#SETERROR }"; echo "OK" ;; + *) echo OK;; + esac +done |