From 0f37d04702430edfa1727e3309645be53e85121f Mon Sep 17 00:00:00 2001 From: Bartek Stalewski Date: Wed, 19 Jul 2023 15:04:09 +0200 Subject: [PATCH] Moving /tmp/f-cache out from tmpfs. --- _cli/zsh/.zshenv | 2 +- _cli/zsh/.zshrc | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/_cli/zsh/.zshenv b/_cli/zsh/.zshenv index f0be057..a8072f1 100644 --- a/_cli/zsh/.zshenv +++ b/_cli/zsh/.zshenv @@ -1,5 +1,5 @@ skip_global_compinit=1 -export XDG_CACHE_HOME=/tmp/${USER}-cache +export XDG_CACHE_HOME=$HOME/.cache export XDG_CONFIG_HOME=$HOME/.config export XDG_DATA_HOME=$HOME/.local/share export XDG_STATE_HOME=$HOME/.local/state diff --git a/_cli/zsh/.zshrc b/_cli/zsh/.zshrc index 86ad478..ae20c12 100644 --- a/_cli/zsh/.zshrc +++ b/_cli/zsh/.zshrc @@ -1,8 +1,7 @@ # prepare directories -if [[ ! -L ~/.cache ]]; then - rm -rf ~/.cache +if [[ -L $XDG_CACHE_HOME ]]; then + rm -rf $XDG_CACHE_HOME mkdir -p $XDG_CACHE_HOME - ln -sf $XDG_CACHE_HOME ~/.cache fi mkdir -p $XDG_DATA_HOME/zsh mkdir -p $XDG_CACHE_HOME/zsh