瀏覽代碼

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

Fabian Peter Hammerle 5 年之前
父節點
當前提交
8b2d1c4af5
共有 1 個文件被更改,包括 3 次插入2 次删除
  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 ${...}: