]> git.sev.monster Git - dotfiles.git/blobdiff - etc/zsh/.zprofile
zsh: export XDG_CACHE_HOME
[dotfiles.git] / etc / zsh / .zprofile
index 3bad054a234e018cfe9dff8511ab32bcc9f05301..d9c05b31b672d5caeecbe65b7b1adc5a0d5c82e9 100644 (file)
@@ -79,9 +79,7 @@ if [[ ! -v _sev_setup_path || -o login ]] {
     # XXX: XDG specifies ~/.local/bin as the only user-writable dir for
     #      executables, but we specify more; technically this is against spec
     syspath=("$path[@]")
-    path=(~/{.local/,}{s,}bin
-          {~/.local,{$PREFIX,}{,/opt,/usr{,/local,pkg}}}/sbin
-          {~/.local,{$PREFIX,}{,/opt,/usr{,/local,pkg}}}/bin
+    path=({{${_sev_home:-~},~}{/.local,},{$PREFIX,}{,/opt,/usr{,/local,/pkg}}}/{s,}bin
           /usr/{X11R{7,6}/bin,games})
     ((len=$#path))
     path=("$path[@]" "$syspath[@]")
@@ -197,7 +195,9 @@ if [[ ! -v _sev_setup_xdg ]] {
         mkdir -m760 ~/.local/state
     }
 
-    if [[ ! -v XDG_CACHE_HOME ]] {
+    if [[ -v XDG_CACHE_HOME ]] {
+        export XDG_CACHE_HOME
+    } else {
         if [[ -v _sev_tmp ]] {
             export XDG_CACHE_HOME=$_sev_tmp/.xdg.cache
             [[ -e $XDG_CACHE_HOME ]] || mkdir -m700 $XDG_CACHE_HOME
@@ -346,8 +346,9 @@ if [[ -v commands[gpg-connect-agent] &&
                   ${+DISPLAY} + ${+WAYLAND_DISPLAY} == 0))
             # XXX: don't know if gpg-agent supports comments after directives
             # XXX: path could have #
+            # XXX: we are assuming this is our pinentry from .local/bin
             sed -Ei 's#^([[:space:]]*pinentry-program[[:space:]]).*$#\1'${commands[pinentry]:-/dev/null}'#' \
-              ${GNUPGHOME:-~/.gnupg}/gpg-agent.conf
+              ${GNUPGHOME:-~/.gnupg}/gpg-agent.conf 2>/dev/null
             # XXX: could check for changes before doing this to save perf
             gpg-connect-agent RELOADAGENT UPDATESTARTUPTTY /bye >/dev/null 2>&1
             if {$p} {
This page took 0.042742 seconds and 4 git commands to generate.