dotfiles/lib/env.zsh

67 lines
1.6 KiB
Bash
Raw Normal View History

2022-08-13 13:26:55 -05:00
#!/usr/bin/env zsh
2023-01-25 16:03:24 -06:00
is-executable nvim && export EDITOR=nvim || export EDITOR=vim
2021-12-08 09:38:24 -06:00
2023-01-25 16:03:24 -06:00
is-executable lf && source "$XDG_CONFIG_HOME/lf/lfcd.sh"
2021-12-08 09:38:24 -06:00
2022-12-09 14:24:46 -06:00
if is-executable fnm && ! is-tty; then
eval "$(fnm env --shell zsh)"
fi
2023-01-25 16:03:24 -06:00
is-executable bat && \
export BAT_THEME=Catppuccin; \
2022-03-02 12:58:49 -06:00
export BAT_STYLE=header,numbers,grid
2022-01-19 15:12:29 -06:00
2022-02-08 09:38:03 -06:00
2023-01-25 16:03:24 -06:00
is-executable zoxide && \
export _ZO_FZF_OPTS="--preview 'command lsd --tree --color always --icon always {2..}'"
2021-12-08 09:38:24 -06:00
2023-01-25 16:03:24 -06:00
is-tty && \
export STARSHIP_CONFIG=~/.config/starship/plain.toml \
|| \
2022-06-04 11:46:08 -05:00
export STARSHIP_CONFIG=~/.config/starship/config.toml
2021-12-08 09:38:24 -06:00
export EGET_BIN=$HOME/bin
# for dotenv
export ZSH_DOTENV_ALLOWED_LIST=$HOME/.cache/dotenv-allowed.list
export ZSH_DOTENV_DISALLOWED_LIST=$HOME/.cache/dotenv-disallowed.list
2022-02-13 19:41:41 -06:00
# mamba
export MAMBA_NO_BANNER=1
2022-04-15 08:40:14 -05:00
# shiv
2023-01-25 16:03:24 -06:00
is-executable shiv && export SHIV_ROOT=$HOME/.local/share/shiv
# pyenv
2022-06-04 11:46:08 -05:00
if [ -d "$HOME/.pyenv" ]; then
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
2022-06-04 11:46:08 -05:00
# pnpm
2023-01-25 16:03:24 -06:00
is-executable pnpm && \
export PNPM_HOME="$HOME/.local/share/pnpm"; \
add-to-path prepend "$PNPM_HOME"
2022-08-12 08:59:20 -05:00
2023-01-25 18:05:09 -06:00
[[ -d "$HOME/.pkgs/google-cloud-sdk" ]] && \
. "$HOME/.pkgs/google-cloud-sdk/completion.zsh.inc"; \
2022-12-01 14:30:31 -06:00
add-to-path prepend "$HOME/.pkgs/google-cloud-sdk/bin"
2022-08-18 13:17:52 -05:00
2023-01-25 16:03:24 -06:00
[ -d "$HOME/.deno" ] && \
export DENO_INSTALL="$HOME/.deno"; \
add-to-path prepend "$DENO_INSTALL/bin"
2022-08-18 13:17:52 -05:00
if [ -d "$HOME/.bun" ]; then
2022-08-30 23:08:41 -05:00
# bun completions
2022-09-29 10:18:29 -05:00
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
2022-08-30 23:08:41 -05:00
# bun
export BUN_INSTALL="$HOME/.bun"
add-to-path prepend "$BUN_INSTALL/bin"
2022-08-18 13:17:52 -05:00
fi
2022-12-27 15:18:40 -06:00
2023-01-25 16:03:24 -06:00
[ -d "$HOME/.nimble" ] && add-to-path prepend "$HOME/.nimble/bin"