aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2022-12-01 08:28:07 +0100
committerDennis Eriksen <d@ennis.no>2022-12-01 08:28:07 +0100
commit363bb11e5b7b3a47a90f11f29e3a5cea1ed54db2 (patch)
treefe1cc287bc0300a328bdb9f00b6857942ebb0810
parentBringing back .zprofile! (diff)
downloadidgatt-363bb11e5b7b3a47a90f11f29e3a5cea1ed54db2.tar.gz
adding some migration-stuff to idgatt.sh, and adding vars to zshenv
-rwxr-xr-xidgatt.sh9
-rw-r--r--zsh/.zshenv8
2 files changed, 16 insertions, 1 deletions
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 ################################################################