2023-05-04 13:47:49 +00:00
|
|
|
#!/usr/bin/env zsh
|
2019-05-01 03:29:37 +00:00
|
|
|
# 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}
|
2020-08-21 22:01:04 +00:00
|
|
|
export ZSH_CACHE=${ZSH_CACHE:-$ZDIR/cache}
|
2019-05-01 03:29:37 +00:00
|
|
|
|
|
|
|
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'
|
|
|
|
|
2019-05-02 05:45:59 +00:00
|
|
|
# Modules for Prompt
|
2019-05-02 05:04:01 +00:00
|
|
|
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
|
2020-01-13 19:22:22 +00:00
|
|
|
#docker # Docker section
|
2019-05-02 05:04:01 +00:00
|
|
|
venv # virtualenv section
|
2020-03-02 15:28:52 +00:00
|
|
|
#kubecontext # Kubectl context section
|
2019-05-02 05:04:01 +00:00
|
|
|
terraform # Terraform workspace section
|
|
|
|
exec_time # Execution time
|
|
|
|
line_sep # Line break
|
|
|
|
battery # Battery level and status
|
|
|
|
jobs # Background jobs indicator
|
|
|
|
exit_code # Exit code section
|
|
|
|
char # Prompt character
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2019-05-01 21:25:56 +00:00
|
|
|
# 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%
|
2019-05-02 05:48:11 +00:00
|
|
|
# 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'"
|
2019-05-01 21:25:56 +00:00
|
|
|
|
2019-05-02 04:48:04 +00:00
|
|
|
# Auto suggestion config
|
|
|
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=7"
|
|
|
|
|
2020-06-03 03:26:08 +00:00
|
|
|
|
|
|
|
typeset -gU path
|
|
|
|
path=(
|
2020-07-22 00:55:45 +00:00
|
|
|
$HOME/.cargo/bin/
|
2020-06-03 03:26:08 +00:00
|
|
|
$HOME/.scripts/
|
2020-06-03 14:26:27 +00:00
|
|
|
$HOME/.emacs.d/bin/
|
2020-06-03 03:26:08 +00:00
|
|
|
$HOME/.yarn/bin/
|
|
|
|
$HOME/.config/yarn/global/node_modules/.bin/
|
|
|
|
$HOME/.local/bin/
|
|
|
|
$path)
|
|
|
|
|
2019-05-03 02:12:03 +00:00
|
|
|
# This will load the specified zsh files if they exist in the $ZDIR/environment directory.
|
2019-05-01 03:29:37 +00:00
|
|
|
# It will load based on hostname & uname.
|
|
|
|
env_loader(){
|
2019-06-29 00:16:14 +00:00
|
|
|
[ -e ${ZDIR}/environment/os/$OSTYPE/$1 ] && source ${ZDIR}/environment/os/$OSTYPE/$1
|
|
|
|
[ -e ${ZDIR}/environment/host/$HOST/$1 ] && source ${ZDIR}/environment/host/$HOST/$1
|
2019-05-01 03:29:37 +00:00
|
|
|
}
|
2019-12-13 00:37:35 +00:00
|
|
|
env_loader zshenv
|