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:
11
.zshrc
11
.zshrc
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user