dotfiles/lib/env.sh

105 lines
2.2 KiB
Bash
Raw Normal View History

2021-12-08 09:38:24 -06:00
# XDG
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
2022-03-29 12:40:10 -05:00
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.local/cache}"
2021-12-08 09:38:24 -06:00
2022-01-21 10:06:52 -06:00
export HISTFILE=~/.zsh_history
2022-01-18 12:29:42 -06:00
export HISTSIZE=32768
export HISTFILESIZE="${HISTSIZE}"
2021-12-08 09:38:24 -06:00
export SAVEHIST=4096
export HISTCONTROL=ignoredups:erasedups
export LESS='-R'
2022-08-02 11:20:17 -05:00
export LS_COLORS="$LS_COLORS:ow=1;34:tw=1;34:"
2021-12-08 09:38:24 -06:00
2022-04-13 00:53:34 -05:00
# add completions to fpath
2022-06-20 15:05:05 -05:00
fpath=($DOTFILES_DIR/lib/completions $fpath)
2022-04-13 00:53:34 -05:00
2021-12-08 09:38:24 -06:00
# Append to the history file, rather than overwriting it
setopt APPEND_HISTORY
# Disable autocd
unsetopt autocd
# Vim Settings
# export VIMINIT='source $MYVIMRC'
2022-06-20 15:05:05 -05:00
# export MYVIMRC='$DOTFILES_DIR/lib/.vimrc'
2022-08-04 00:26:32 -05:00
2022-01-27 10:41:14 -06:00
if is-executable lvim; then
2022-03-02 12:58:49 -06:00
export EDITOR=lvim
2022-01-27 10:41:14 -06:00
elif is-executable nvim; then
2021-12-08 09:38:24 -06:00
export EDITOR=nvim
else
export EDITOR=vim
fi
# spelling correction
# setopt CORRECT
# setopt CORRECT_ALL
# Setup fzf
# ---------
2022-01-18 12:29:42 -06:00
if [[ $PATH != *$HOME/.fzf/bin* ]]; then
export PATH="${PATH:+${PATH}:}$HOME/.fzf/bin"
2021-12-08 09:38:24 -06:00
fi
if is-executable fzf; then
2022-06-20 15:05:05 -05:00
source $DOTFILES_DIR/lib/fzf.zsh
2021-12-08 09:38:24 -06:00
fi
# ---------
# Add lfcd command
# ----------------
if is-executable lf; then
source "$XDG_CONFIG_HOME/lf/lfcd.sh"
fi
# ----------------
2021-12-17 01:37:48 -06:00
if is-executable fnm; then
2022-01-18 12:29:42 -06:00
eval "$(fnm env)"
2021-12-17 01:37:48 -06:00
fi
2021-12-08 09:38:24 -06:00
2022-01-19 15:12:29 -06:00
if is-executable bat; then
2022-04-29 10:36:13 -05:00
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
fi
2022-02-08 09:38:03 -06:00
if is-executable zoxide; then
2022-03-02 12:58:49 -06:00
export _ZO_FZF_OPTS="--preview 'command lsd --tree --color always --icon always {2..}'"
2022-02-08 09:38:03 -06:00
fi
2021-12-08 09:38:24 -06:00
export ENHANCD_DOT_ARG="up"
2022-05-18 00:21:46 -05:00
if is-tty; then
2022-06-04 11:46:08 -05:00
export STARSHIP_CONFIG=~/.config/starship/plain.toml
2022-05-18 00:21:46 -05:00
else
2022-06-04 11:46:08 -05:00
export STARSHIP_CONFIG=~/.config/starship/config.toml
2022-05-18 00:21:46 -05:00
fi
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
2022-04-15 08:41:08 -05:00
if is-executable shiv; then
export SHIV_ROOT=$HOME/.local/share/shiv
2022-04-15 08:40:14 -05:00
fi
# 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
export PNPM_HOME="/home/daylin/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
# pnpm end