Browse Source

set $GPG_TTY only if gpgconf is available to speed up rc

Fabian Peter Hammerle 5 years ago
parent
commit
8b2d1c4af5
1 changed files with 3 additions and 2 deletions
  1. 3 2
      rc.xsh

+ 3 - 2
rc.xsh

@@ -70,9 +70,10 @@ $PAGER = 'less'
 $EDITOR = 'vim'
 # i3-sensible-terminal
 $TERMINAL = 'termite'
-# required by pinentry-tty when using gpg command:
-$GPG_TTY = $(tty)
 if shutil.which('gpgconf'):
+    # required by pinentry-tty when using gpg command
+    # takes approx 100ms in termux on galaxy S7
+    $GPG_TTY = $(tty)
     # required by scute
     $GPG_AGENT_INFO = $(gpgconf --list-dir agent-socket).rstrip() + ':0:1'
     if not 'SSH_CLIENT' in ${...}: