Files
dotfiles-zsh/.zshrc
phansible d33ced3f6e 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.
2024-03-01 14:55:29 -05:00

43 lines
1.4 KiB
Bash

# 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)
export ZSH_COMPDUMP=$ZSH/cache/completions/.zcompdump-$HOST
source $ZSH/oh-my-zsh.sh
# User-defined Aliases and Functions
[[ ! -f ~/.shell_functions ]] || source ~/.shell_functions
[[ ! -f ~/.shell_aliases ]] || source ~/.shell_aliases
$HOME/dotfiles-zsh/get-quote.sh
# Instant Prompt Preamble
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If .fzf.zsh exists, source it
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# If .p10k.zsh exists, source it
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# If .zshrc.$USER exists, source it
[[ ! -f ~/.zshrc.$USER ]] || source ~/.zshrc.$USER