]> git.sev.monster Git - dotfiles.git/commitdiff
actually set PINENTRY_USER_DATA, fix invocation
authorsev <git@sev.monster>
Wed, 21 Oct 2020 12:42:15 +0000 (07:42 -0500)
committersev <git@sev.monster>
Fri, 5 Apr 2024 21:27:40 +0000 (16:27 -0500)
also some small autoload changes

base/.zprofile
base/.zshrc
bin/pinentry
gpg/gpg-agent.conf

index 82e70e412d7083d3d0019bcebbd0a1ee74fa7a55..a0e4d369dde661480e70b46e5b3cf81b46187a6d 100644 (file)
@@ -28,8 +28,10 @@ export PYTHONSTARTUP=~/.pythonrc
 if (( ${+commands[gpg]} )) {
     # SSH_AUTH_SOCK should be set in a remote SSH session for passthrough
     # if it isn't, we are likely the first login shell on the local machine
-    if [[ ! -v SSH_AUTH_SOCK ]] {
+    # we also want to update USE_TTY if we are the login shell in graphics mode
+    if [[ ! -v SSH_AUTH_SOCK || -v DISPLAY ]] {
         export GPG_TTY=$(tty)
+        export PINENTRY_USER_DATA=USE_TTY=$((! ${+DISPLAY}))
         gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null
         export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
     }
index 412c5ba5401add44cfabf33917c30a471ea24b48..644e1789e8a43a72b8585fa345ae31fd17bfad50 100644 (file)
@@ -177,11 +177,11 @@ esac
 
 ### modules & styles
 ## vcs
-autoload -Uz vcs_info
 zstyle ':vcs_info:*' enable git
 #zstyle ':vcs_info:git*' check-for-changes true #too slow
 zstyle ':vcs_info:git*:dotfiles' check-for-changes true
 zstyle ':vcs_info:git*' check-for-staged-changes true
+autoload -Uz vcs_info
 
 ## compinit
 zstyle ':completion:*' auto-description '[arg] %d'
@@ -198,8 +198,6 @@ zstyle ':completion:*' menu select=1
 zstyle ':completion:*' original false
 zstyle ':completion:*' select-prompt '%B%l%b'
 zstyle ':completion:*' verbose true
-zstyle :compinstall filename '/home/ds6/.zshrc'
-
 autoload -Uz compinit && compinit
 
 ## prompt
index 7b83ff5d3be433d12a3f167a3997d5cb9f258696..52fd48ae9f65af9dc70ae16bd37748bc43fcb45b 100755 (executable)
@@ -2,11 +2,12 @@
 # https://kevinlocke.name/bits/2019/07/31/prefer-terminal-for-gpg-pinentry
 
 set -Ce
-graphics="gtk-2 gtk qt x11 gnome"
+gfx="gnome gtk-2 gtk qt x11"
 tty="curses tty"
 case "${PINENTRY_USER_DATA-}" in
-       *USE_TTY=1*) list="$tty $graphics";;
-       *)           list="$graphics $tty";;
+       # prefer tty unless USE_TTY is 0
+       *USE_TTY=0*) list="$gfx $tty";;
+       *)           list="$tty $gfx";;
 esac
 
 for x in $list; do
index 80751004980615c66a2438610b8686f9d0f9629b..95a2898ca57e45a7f8e066cf4b35ad5e9e3580e8 100644 (file)
@@ -1,2 +1,2 @@
 enable-ssh-support
-pinentry-program ~/bin/pinentry
+pinentry-program /home/sev/bin/pinentry
This page took 0.037013 seconds and 4 git commands to generate.