diff options
author | Fredrik Salomonsson <plattfot@gmail.com> | 2018-11-03 17:15:17 -0700 |
---|---|---|
committer | Fredrik Salomonsson <plattfot@gmail.com> | 2018-11-03 17:15:17 -0700 |
commit | 11dedd6244336ac697bf2f038c6046c374ce77db (patch) | |
tree | d55ce986769a47e501091fe8bbd32016cfe0d140 /rofi-pinentry.scm | |
parent | 1878c51a8cb38275d2067d6b8c2df2f899e24c80 (diff) | |
download | pinentry-rofi-11dedd6244336ac697bf2f038c6046c374ce77db.tar.gz |
Playing around with the format for rofi
Diffstat (limited to 'rofi-pinentry.scm')
-rwxr-xr-x | rofi-pinentry.scm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rofi-pinentry.scm b/rofi-pinentry.scm index 6af9fbf..cb033f9 100755 --- a/rofi-pinentry.scm +++ b/rofi-pinentry.scm @@ -32,7 +32,7 @@ (define (pinentry-loop pinentry pinregex input-port) (let ((line (get-line input-port)) - (rofi "rofi -dmenu -input /dev/null ~a -disable-history -p ~s -mesg ~s") + (rofi "rofi -dmenu -input /dev/null ~a -disable-history -p ~s ~a ~s") (regex-match #f)) (unless (eof-object? line) (cond @@ -49,17 +49,19 @@ (format #t rofi (if (pinentry-visibility pinentry) "" "-password") (pinentry-prompt pinentry) + (if (equal? (pinentry-desc pinentry) "") "" "-mesg") (pinentry-desc pinentry))) + ((set-and-return! regex-match (regexp-exec (pinregex-bye pinregex) line)) (exit #t)) + (#t (begin (format #t "BYE\n") - (exit #f))) - ) + (exit #f)))) (pinentry-loop pinentry pinregex input-port)))) (format #t "OK Please go ahead\n") -(let ((pinentry (make-pinentry #t "Passphrase:" "Please enter the passphrase" #f)) +(let ((pinentry (make-pinentry #t "Passphrase:" "" #f)) (pinregex (make-pinregex (make-regexp "^OPTION (.+)$") (make-regexp "^GETINFO (.+)$") |