NOTES_DIR default

.zshrc will attempt to set the NOTES_DIR environment variable

First check to see if the environment variable is set.  If not,
if `$HOME/Sync/MarkdownNotes` exits, then use that.  If that directory
doesn't exist, try `$HOME/Documents`.  If they both fail, then don't set
the var.
This commit is contained in:
2024-03-01 14:55:29 -05:00
parent 9e434c94f5
commit d33ced3f6e

11
.zshrc
View File

@@ -1,7 +1,16 @@
# Exports
export PATH=$HOME/bin:/usr/local/bin:$HOME/.local/bin/:$PATH
export ZSH="$HOME/.oh-my-zsh"
# Export notes directory
if [[ -z $NOTES_DIR ]]; then
if [[ -d $HOME/Sync/MarkdownNotes ]]; then
export NOTES_DIR=$HOME/Sync/MarkdownNotes
else
if [[ -d $HOME/Documents ]]; then
export NOTES_DIR=$HOME/Documents
fi
fi
fi
ZSH_THEME="powerlevel10k/powerlevel10k"
POWERLEVEL9K_MODE="nerdfont-complete"
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)