summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
03b903d)
also some small autoload changes
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 (( ${+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 PINENTRY_USER_DATA=USE_TTY=$((! ${+DISPLAY}))
gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
}
gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
}
### modules & styles
## vcs
### modules & styles
## vcs
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
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
## compinit
zstyle ':completion:*' auto-description '[arg] %d'
## compinit
zstyle ':completion:*' auto-description '[arg] %d'
zstyle ':completion:*' original false
zstyle ':completion:*' select-prompt '%B%l%b'
zstyle ':completion:*' verbose true
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
autoload -Uz compinit && compinit
## prompt
# https://kevinlocke.name/bits/2019/07/31/prefer-terminal-for-gpg-pinentry
set -Ce
# 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
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";;
-pinentry-program ~/bin/pinentry
+pinentry-program /home/sev/bin/pinentry