Skip to content

Commit 9d55934

Browse files
committed
Add gpg-agent support, switch to custom bullet-train
1 parent 2fa1591 commit 9d55934

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.zshrc

+14-5
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ else
9393
export EDITOR='vim'
9494

9595
# Powerline powered theme - Looks really nice, provides a good deal of info
96-
zgen load caiogondim/bullet-train-oh-my-zsh-theme bullet-train
96+
zgen load masterkoppa/bullet-train-oh-my-zsh-theme bullet-train add-battery
9797
fi
9898
# Alias for when using OSX
9999
if [[ $platform == 'darwin' ]] && which gdircolors &> /dev/null ; then
@@ -123,14 +123,23 @@ export BULLETTRAIN_CONTEXT_DEFAULT_USER='andres'
123123
if [[ $platform == 'linux' ]]; then
124124
# Compilation flags
125125
export ARCHFLAGS="-arch x86_64"
126-
127-
# Set the ssh agent
128-
export SSH_ASKPASS="/etc/profile.d/ksshaskpass.sh"
129-
130126
export LANG=en_US.UTF-8
131127

132128
# Emulate the open command in linux
133129
alias 'open'='xdg-open'
130+
if is_installed gpg-agent; then
131+
132+
# TODO Check for gpg-agent before calling this
133+
if ! pgrep -x -u "${USER}" gpg-agent >/dev/null 2>&1; then
134+
gpg-connect-agent /bye >/dev/null 2>&1
135+
fi
136+
137+
unset SSH_AGENT_PID
138+
139+
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
140+
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
141+
fi
142+
fi
134143
fi
135144

136145
if is_installed clang; then

0 commit comments

Comments
 (0)