aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredrik Salomonsson <plattfot@gmail.com>2018-11-03 17:15:17 -0700
committerFredrik Salomonsson <plattfot@gmail.com>2018-11-03 17:15:17 -0700
commit11dedd6244336ac697bf2f038c6046c374ce77db (patch)
treed55ce986769a47e501091fe8bbd32016cfe0d140
parent1878c51a8cb38275d2067d6b8c2df2f899e24c80 (diff)
downloadpinentry-rofi-11dedd6244336ac697bf2f038c6046c374ce77db.tar.gz
Playing around with the format for rofi
-rwxr-xr-xrofi-pinentry.scm10
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 (.+)$")