feat: move relevant things from .zshrc to .zshenv
This commit is contained in:
parent
ceff9db86f
commit
64529e8fd2
|
@ -0,0 +1,35 @@
|
||||||
|
# default configuration as per https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
|
export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
|
export XDG_CACHE_HOME="$HOME/.cache"
|
||||||
|
export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
|
export XDG_STATE_HOME="$HOME/.local/state"
|
||||||
|
|
||||||
|
# brew sbin
|
||||||
|
export PATH="/opt/homebrew/sbin:$PATH"
|
||||||
|
# brew lib
|
||||||
|
export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"
|
||||||
|
|
||||||
|
# cargo
|
||||||
|
source "$HOME/.cargo/env"
|
||||||
|
|
||||||
|
# language environment
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
# editor
|
||||||
|
export EDITOR=nvim
|
||||||
|
|
||||||
|
# go
|
||||||
|
export GOHOME="$XDG_DATA_HOME/go"
|
||||||
|
export GOMODCACHE="$XDG_CACHE_HOME/go/mod"
|
||||||
|
export PATH="$PATH:$GOHOME/bin"
|
||||||
|
|
||||||
|
# neovim
|
||||||
|
export PATH="$HOME/neovim/bin:$PATH"
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
export PYENV_ROOT="$XDG_DATA_HOME/.pyenv"
|
||||||
|
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
|
|
||||||
|
# poetry
|
||||||
|
export POETRY_HOME="$XDG_DATA_HOME/poetry"
|
||||||
|
command -v poetry >/dev/null || export PATH="$POETRY_HOME/bin:$PATH"
|
34
zsh/.zshrc
34
zsh/.zshrc
|
@ -1,8 +1,5 @@
|
||||||
# default configuration as per https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
# zsh history file
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
export HISTFILE="$XDG_STATE_HOME/zsh/history"
|
||||||
export XDG_CACHE_HOME="$HOME/.cache"
|
|
||||||
export XDG_DATA_HOME="$HOME/.local/share"
|
|
||||||
export XDG_STATE_HOME="$HOME/.local/state"
|
|
||||||
|
|
||||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc.
|
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc.
|
||||||
# Initialization code that may require console input (password prompts, [y/n]
|
# Initialization code that may require console input (password prompts, [y/n]
|
||||||
|
@ -17,9 +14,6 @@ autoload -Uz compinit
|
||||||
compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION
|
compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION
|
||||||
zstyle ':completion:*' cache-path $XDG_CACHE_HOME/zsh/zcompcache
|
zstyle ':completion:*' cache-path $XDG_CACHE_HOME/zsh/zcompcache
|
||||||
|
|
||||||
# zsh history file
|
|
||||||
export HISTFILE="$XDG_STATE_HOME/zsh/history"
|
|
||||||
|
|
||||||
# pre plugin load
|
# pre plugin load
|
||||||
export NVM_COMPLETION=true
|
export NVM_COMPLETION=true
|
||||||
export NVM_AUTO_USE=true
|
export NVM_AUTO_USE=true
|
||||||
|
@ -35,7 +29,6 @@ antigen bundle git
|
||||||
# zsh users plugin
|
# zsh users plugin
|
||||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||||
antigen bundle zsh-users/zsh-autosuggestions
|
antigen bundle zsh-users/zsh-autosuggestions
|
||||||
antigen bundle zsh-users/zsh-completions
|
|
||||||
|
|
||||||
# other
|
# other
|
||||||
antigen bundle lukechilds/zsh-nvm
|
antigen bundle lukechilds/zsh-nvm
|
||||||
|
@ -46,30 +39,10 @@ antigen theme romkatv/powerlevel10k
|
||||||
# apply plugin load
|
# apply plugin load
|
||||||
antigen apply
|
antigen apply
|
||||||
|
|
||||||
# # language environment
|
|
||||||
export LANG=en_US.UTF-8
|
|
||||||
|
|
||||||
# brew sbin
|
|
||||||
export PATH="/opt/homebrew/sbin:$PATH"
|
|
||||||
|
|
||||||
# pyenv
|
# pyenv
|
||||||
export PYENV_ROOT="$XDG_DATA_HOME/.pyenv"
|
|
||||||
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
|
||||||
eval "$(pyenv init -)"
|
eval "$(pyenv init -)"
|
||||||
eval "$(pyenv virtualenv-init -)"
|
eval "$(pyenv virtualenv-init -)"
|
||||||
|
|
||||||
# poetry
|
|
||||||
export POETRY_HOME="$XDG_DATA_HOME/poetry"
|
|
||||||
export PATH="/Users/janezicmatej/.local/share/poetry/bin:$PATH"
|
|
||||||
|
|
||||||
# neovim
|
|
||||||
export PATH="$HOME/neovim/bin:$PATH"
|
|
||||||
|
|
||||||
# go
|
|
||||||
export GOHOME="$XDG_DATA_HOME/go"
|
|
||||||
export GOMODCACHE="$XDG_CACHE_HOME/go/mod"
|
|
||||||
export PATH="$PATH:$GOHOME/bin"
|
|
||||||
|
|
||||||
# ggman
|
# ggman
|
||||||
export GGROOT="$HOME/Desktop/git"
|
export GGROOT="$HOME/Desktop/git"
|
||||||
eval "$(ggman shellrc)"
|
eval "$(ggman shellrc)"
|
||||||
|
@ -77,9 +50,6 @@ eval "$(ggman shellrc)"
|
||||||
# gpg
|
# gpg
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
|
|
||||||
# editor
|
|
||||||
export EDITOR=nvim
|
|
||||||
|
|
||||||
# custom functions and aliases
|
# custom functions and aliases
|
||||||
source "$ZDOTDIR/aliases.zsh"
|
source "$ZDOTDIR/aliases.zsh"
|
||||||
source "$ZDOTDIR/scripts.zsh"
|
source "$ZDOTDIR/scripts.zsh"
|
||||||
|
|
Loading…
Reference in New Issue