From 363bb11e5b7b3a47a90f11f29e3a5cea1ed54db2 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Thu, 1 Dec 2022 08:28:07 +0100 Subject: adding some migration-stuff to idgatt.sh, and adding vars to zshenv --- idgatt.sh | 9 +++++++++ zsh/.zshenv | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/idgatt.sh b/idgatt.sh index bd98430..04870ca 100755 --- a/idgatt.sh +++ b/idgatt.sh @@ -59,6 +59,15 @@ fi cd "${DIR}" || exit +# Check that .zsh_history is a symlink. Move it if not. This is a temporary fix to help move the file for users + +if [[ -f ~/.zsh/.zsh_history ]] && [[ ! -h ~/.zsh/.zsh_history ]]; then + mkdir -m 700 -p ~/.local/state/zsh + mv ~/.zsh/.zsh_history ~/.local/state/zsh/zsh_history +fi + + +# Stow everything for item in *; do [[ -d "${item}" ]] && stow ${STOWFLAGS:-} --restow --stow --no-folding "${item}" done diff --git a/zsh/.zshenv b/zsh/.zshenv index 8463850..7614398 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -53,8 +53,14 @@ export XDG_CACHE_HOME=~/.cache export XDG_DATA_HOME=~/.local/share export XDG_STATE_HOME=~/.local/state -# ZDOTDIR +# ZDIRS export ZDOTDIR=~/.zsh +export ZCACHEDIR="$XDG_CACHE_HOME"/zsh +export ZSTATEDIR="$XDG_STATE_HOME"/zsh + +# TMPDIR +export TMPDIR="${TMPDIR:-/tmp}" + ## END OF FILE ################################################################ -- cgit v1.2.3