1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # 30_env.zprofile: Setup environment
5 if [[ -z "$TZ" && -r "/etc/timezone" ]]; then
6 TZ=$(<"/etc/timezone") export TZ
9 # Setup XDG cache directory
10 if [[ -z "$XDG_CACHE_HOME" ]]; then
11 XDG_CACHE_HOME="$LOCAL_HOME/.cache"
12 mkdir -p "$XDG_CACHE_HOME"
13 chmod 0700 "$XDG_CACHE_HOME"
17 # Setup XDG runtime directory
18 if [[ -z "$XDG_RUNTIME_DIR" ]]; then
19 XDG_RUNTIME_DIR="${TMPDIR:-/tmp/${UID}-runtime-dir}"
20 mkdir -p "$XDG_RUNTIME_DIR"
21 chmod 0700 "$XDG_RUNTIME_DIR"
23 export XDG_RUNTIME_DIR
25 # Setup ZSH cache directory
26 if [[ -z "$ZSH_CACHE_DIR" ]]; then
27 ZSH_CACHE_DIR="$XDG_CACHE_HOME/zsh"
28 mkdir -p "$ZSH_CACHE_DIR"
29 chmod 0700 "$ZSH_CACHE_DIR"