diff options
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 |