dotfiles/zsh/zshenv
James Patrick c4320bbe97 Hard coding yarn bin paths.
using yarn bin and yarn global bin make the startup time take
significantly longer.
2020-03-13 15:05:00 -04:00

93 lines
2.7 KiB
Bash

# vim: syn=zsh
# Language
# TODO: LANG is getting set to "C" somewhere. Until I figure that out, I'm hard coding it.
#export LANG=${LANG:-en_US.UTF-8}
export LANG=en_US.UTF-8
export ZDOTDIR=${ZDOTDIR:-$HOME}
export ZDIR=${ZDIR:-$HOME/.zsh}
export ZPLUG_HOME=${ZPLUG_HOME:-$HOME/.zplug}
export EDITOR='vim'
export VISUAL='vim'
export PAGER='less'
# Less
# Set the default Less options.
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
# Remove -X and -F (exit if the content fits on one screen) to enable it.
export LESS='-F -g -i -M -R -S -w -X -z-4'
# Modules for Prompt
if [ -z "$SPACESHIP_PROMPT_ORDER" ]; then
SPACESHIP_PROMPT_ORDER=(
time # Time stampts section
user # Username section
dir # Current directory section
host # Hostname section
git # Git section (git_branch + git_status)
package # Package version
node # Node.js section
ruby # Ruby section
elm # Elm section
golang # Go section
rust # Rust section
haskell # Haskell Stack section
#docker # Docker section
venv # virtualenv section
pyenv # Pyenv section
#kubecontext # Kubectl context section
terraform # Terraform workspace section
exec_time # Execution time
line_sep # Line break
battery # Battery level and status
vi_mode # Vi-mode indicator
jobs # Background jobs indicator
exit_code # Exit code section
char # Prompt character
)
fi
# Set tmux profile default values.
zstyle ':tmux:auto-start' local 'yes'
zstyle ':tmux:auto-start' name 'tmux'
# FZF tmux properties.
FZF_TMUX=1
FZF_TMUX_HEIGHT=30%
# Add fzf functions
export FZF_CTRL_T_OPTS="--preview \" (( $+commands[bat] )) \
&& bat --color=always --line-range :500 {} \
|| cat {} \""
export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -100'"
# Auto suggestion config
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=7"
# This will load the specified zsh files if they exist in the $ZDIR/environment directory.
# It will load based on hostname & uname.
env_loader(){
[ -e ${ZDIR}/environment/os/$OSTYPE/$1 ] && source ${ZDIR}/environment/os/$OSTYPE/$1
[ -e ${ZDIR}/environment/host/$HOST/$1 ] && source ${ZDIR}/environment/host/$HOST/$1
}
if (( $+commands[yarn] )) ; then
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
fi
user_script_dir=~/.scripts
if [ -d $user_script_dir ] ; then
export PATH="$user_script_dir:$PATH"
fi
if [ -d ~/.emacs.d/bin/ ] ; then
DOOM_BIN="$HOME/.emacs.d/bin"
export PATH="$DOOM_BIN:$PATH"
fi
env_loader zshenv
# Dedup path.
typeset -gU path