1
0
Fork 0
mirror of https://github.com/MillironX/dotfiles.git synced 2024-11-15 03:13:10 +00:00
dotfiles/executable_dot_zshrc

111 lines
3.1 KiB
Text
Raw Normal View History

2021-08-24 23:16:19 +00:00
# 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
2021-08-25 16:15:41 +00:00
if [ -f "$HOME/.modules" ]; then
source $HOME/.modules
fi
2021-09-01 17:35:54 +00:00
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
export PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
2021-08-24 23:16:19 +00:00
# Load the antigen library
if [[ ! -f "$HOME/.antigen.zsh" ]]; then
curl -L git.io/antigen > $HOME/.antigen.zsh
fi
source "$HOME/.antigen.zsh"
# Load the oh-my-zsh library
antigen use oh-my-zsh
# Default bundles
antigen bundle git
antigen bundle gitignore
antigen bundle colored-man-pages
antigen bundle cp
antigen bundle screen
antigen bundle npm
antigen bundle bundler
antigen bundle extract
# Custom bundles
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-completions
antigen bundle esc/conda-zsh-completion
antigen bundle RobSis/zsh-completion-generator
antigen bundle kloetzl/biozsh
antigen bundle millironx/cowsay-cows
DEFAULT_USER="$USER"
# Theming: if I have a nerd fond, use it to the fullest extent possible
# If not, check for basic powerline, then fall back to text-based
# The presence of nerd fonts and/or powerline fonts will be designated
# by the presence of a ".nf" and ".powerline" file in the home directory,
# respectively
source /etc/os-release
if [[ -f "$HOME/.nf" ]]; then
# Nerd font config flag set
antigen theme romkatv/powerlevel10k
else
if [[ -f "$HOME/.powerline" ]]; then
# Powerline config flag set
antigen theme https://gist.github.com/e95df0a0aa6d1721e85b905399971515.git believer
else
# Powerline config flag not set
antigen theme https://gist.github.com/efde5e8d507bd3e1e046198b69d579f8.git gianu-improved
fi
fi
# oh-my-zsh configuration settings
HYPHEN_INSENSITIVE="true"
ENABLE_CORRECTION="true"
COMPLETION_WAITING_DOTS="true"
2021-08-25 01:00:29 +00:00
source $HOME/.hooks
2021-08-24 23:16:19 +00:00
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('$HOME/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then
. "$HOME/miniconda3/etc/profile.d/conda.sh"
else
export PATH="$HOME/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# >>> direnv initalize >>>
2021-09-01 17:16:59 +00:00
if [ $(command -v direnv) ]; then
eval "$(direnv hook zsh)"
fi
2021-08-24 23:16:19 +00:00
# <<< direnv initalize <<<
# Tell Antigen that you're done
antigen apply
# User configuration
# Setup bash completion support
# (zsh completion support is handled by oh-my-zsh)
autoload -U bashcompinit
bashcompinit
source $HOME/.envvar
2021-08-24 23:16:19 +00:00
alias zshconfig="$EDITOR ~/.zshrc"
2021-08-25 00:46:22 +00:00
source $HOME/.aliases
2021-08-24 23:16:19 +00:00
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh