aboutsummaryrefslogtreecommitdiffstats
path: root/pinentry-rofi.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pinentry-rofi.sh')
-rwxr-xr-xpinentry-rofi.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/pinentry-rofi.sh b/pinentry-rofi.sh
index 5b4d179..386054f 100755
--- a/pinentry-rofi.sh
+++ b/pinentry-rofi.sh
@@ -92,8 +92,6 @@ basturlencode () {
rofi_cmd="rofi -dmenu -input /dev/null -password"
INSIDE_BATS=${INSIDE_BATS:-0}
-assuan_send "OK Please go ahead"
-
win_title="Prompt for password"
win_prompt="Password"
win_mesg=""
@@ -103,6 +101,8 @@ keyinfo=""
main () {
local temp_str
+ assuan_send "OK Please go ahead"
+
while : ; do
read -r line
log_debug "line=$line"
@@ -231,6 +231,10 @@ main () {
if [ "$0" = "$BASH_SOURCE" ]; then
- main
+ if [ "$XDG_SESSION_TYPE" != "tty" ] ; then
+ main
+ else
+ exec pinentry-tty "$@"
+ fi
fi