소스 검색

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 ${...}: