From: Samir Benmendil Date: Tue, 9 Dec 2014 18:58:40 +0000 (+0000) Subject: zsh: move gpg to XDG dirs X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/b3b372c042301763e31dc6959007c078603396ea?ds=inline zsh: move gpg to XDG dirs --- diff --git a/zsh/lib/gpg.zsh b/zsh/lib/gpg.zsh index 818e241..aea97b3 100644 --- a/zsh/lib/gpg.zsh +++ b/zsh/lib/gpg.zsh @@ -11,8 +11,8 @@ if (( ! $+commands[gpg-agent] )); then fi # Set the default paths to gpg-agent files. -_gpg_agent_conf="$HOME/.gnupg/gpg-agent.conf" -_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env" +_gpg_agent_conf="$XDG_CONFIG_HOME/gnupg/gpg-agent.conf" +_gpg_agent_env="$XDG_CACHE_HOME/gpg-agent-info" # Start gpg-agent if not started. if ! ps -U "$USER" -o ucomm | grep -q gpg-agent; then diff --git a/zshenv b/zshenv index bde8c38..710e9f6 100644 --- a/zshenv +++ b/zshenv @@ -5,7 +5,10 @@ export XDG_DATA_HOME="$HOME/.local/share" export XDG_CACHE_HOME="$HOME/.cache" export HOST=$(hostname) -systemctl --user import-environment XDG_CACHE_HOME XDG_DATA_HOME XDG_CONFIG_HOME +systemctl --user import-environment \ + XDG_CACHE_HOME \ + XDG_CONFIG_HOME \ + XDG_DATA_HOME # vim stuff [[ -d "$XDG_CACHE_HOME/vim" ]] || mkdir -p "$XDG_CACHE_HOME/vim" @@ -31,3 +34,6 @@ export TASKRC="$XDG_CONFIG_HOME/taskrc" # mpv & mplayer export MPV_HOME="$XDG_CONFIG_HOME/mpv" export MPLAYER_HOME="$XDG_CONFIG_HOME/mplayer" + +# gpg +export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"