1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00
dotfiles/private_dot_config/zsh/dot_zshenv

254 lines
3.9 KiB
Plaintext
Raw Normal View History

2020-05-16 17:57:01 +00:00
path_if_exists() {
if [[ -d $1 ]]; then
export PATH="$1:$PATH"
fi
}
# Stop tmux bitching about 256 colours
TERM="xterm-256color"
# PATH
2020-11-15 14:16:05 +00:00
path_if_exists ~/.local/share/yarn/global/node_modules/.bin
2020-05-16 17:57:01 +00:00
path_if_exists ~/.local/bin
2021-06-25 17:14:45 +00:00
path_if_exists ~/.local/share/doom/bin
2020-06-14 17:59:12 +00:00
path_if_exists ~/.local/share/go/bin
path_if_exists ~/.local/share/cargo/bin
2020-05-16 17:57:01 +00:00
2022-06-11 13:15:48 +00:00
# Add local node_modules
export PATH="./node_modules/.bin/:$PATH"
2020-05-16 17:57:01 +00:00
# Set GPG TTY
export GPG_TTY="$(tty)"
# Set default browser
2021-03-13 14:34:46 +00:00
if [ -e "/sbin/brave" ]; then
2020-05-16 17:57:01 +00:00
export BROWSER="brave"
2021-03-13 14:34:46 +00:00
elif [ -e "/sbin/firefox" ]; then
export BROWSER="firefox"
2020-05-16 17:57:01 +00:00
fi
# Set default terminal
2021-03-13 14:34:46 +00:00
export TERMINAL="st"
2020-05-16 17:57:01 +00:00
# pkg editor
export VISUAL="nvim"
# editor
export EDITOR="nvim"
# Enable password store extensions
export PASSWORD_STORE_ENABLE_EXTENSIONS="true"
2020-05-16 18:05:52 +00:00
# Make sure pass uses the proper directory
export PASSWORD_STORE_DIR=~/.local/share/pass
2022-06-11 13:16:45 +00:00
# Make sure pass ignores throw-keyids config
export PASSWORD_STORE_GPG_OPTS="--no-throw-keyids"
2020-05-16 18:05:52 +00:00
# Use alternative muhome
export MU_HOME=~/.cache/mu
# Load xinit from the proper directory
2020-05-18 19:12:24 +00:00
export XINITRC=~/.config/X11/xinitrc
2020-05-16 18:05:52 +00:00
2020-05-16 17:57:01 +00:00
# This needs to be set for bspwm to see config
export XDG_CONFIG_HOME="$HOME/.config"
# Rust
export CARGO_HOME=~/.local/share/cargo
export RUSTUP_HOME=~/.local/share/rustup
# Golang
export GOPATH=~/.local/share/go
# Npm
export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
2020-05-16 18:05:52 +00:00
# Enable icons in lf
export LF_ICONS="\
tw=:\
st=:\
ow=:\
dt=:\
di=:\
fi=:\
ln=:\
or=:\
ex=:\
*.c=:\
*.cc=:\
*.clj=:\
*.coffee=:\
*.cpp=:\
*.css=:\
*.d=:\
*.dart=:\
*.erl=:\
*.exs=:\
*.fs=:\
*.go=:\
*.h=:\
*.hh=:\
*.hpp=:\
*.hs=:\
*.html=:\
*.java=:\
*.jl=:\
*.js=:\
*.json=:\
*.lua=:\
*.md=:\
*.php=:\
*.pl=:\
*.pro=:\
*.py=:\
*.rb=:\
*.rs=:\
*.scala=:\
*.ts=:\
*.vim=:\
*.cmd=:\
*.ps1=:\
*.sh=:\
*.bash=:\
*.zsh=:\
*.fish=:\
*.tar=:\
*.tgz=:\
*.arc=:\
*.arj=:\
*.taz=:\
*.lha=:\
*.lz4=:\
*.lzh=:\
*.lzma=:\
*.tlz=:\
*.txz=:\
*.tzo=:\
*.t7z=:\
*.zip=:\
*.z=:\
*.dz=:\
*.gz=:\
*.lrz=:\
*.lz=:\
*.lzo=:\
*.xz=:\
*.zst=:\
*.tzst=:\
*.bz2=:\
*.bz=:\
*.tbz=:\
*.tbz2=:\
*.tz=:\
*.deb=:\
*.rpm=:\
*.jar=:\
*.war=:\
*.ear=:\
*.sar=:\
*.rar=:\
*.alz=:\
*.ace=:\
*.zoo=:\
*.cpio=:\
*.7z=:\
*.rz=:\
*.cab=:\
*.wim=:\
*.swm=:\
*.dwm=:\
*.esd=:\
*.jpg=:\
*.jpeg=:\
*.mjpg=:\
*.mjpeg=:\
*.gif=:\
*.bmp=:\
*.pbm=:\
*.pgm=:\
*.ppm=:\
*.tga=:\
*.xbm=:\
*.xpm=:\
*.tif=:\
*.tiff=:\
*.png=:\
*.svg=:\
*.svgz=:\
*.mng=:\
*.pcx=:\
*.mov=:\
*.mpg=:\
*.mpeg=:\
*.m2v=:\
*.mkv=:\
*.webm=:\
*.ogm=:\
*.mp4=:\
*.m4v=:\
*.mp4v=:\
*.vob=:\
*.qt=:\
*.nuv=:\
*.wmv=:\
*.asf=:\
*.rm=:\
*.rmvb=:\
*.flc=:\
*.avi=:\
*.fli=:\
*.flv=:\
*.gl=:\
*.dl=:\
*.xcf=:\
*.xwd=:\
*.yuv=:\
*.cgm=:\
*.emf=:\
*.ogv=:\
*.ogx=:\
*.aac=:\
*.au=:\
*.flac=:\
*.m4a=:\
*.mid=:\
*.midi=:\
*.mka=:\
*.mp3=:\
*.mpc=:\
*.ogg=:\
*.ra=:\
*.wav=:\
*.oga=:\
*.opus=:\
*.spx=:\
*.xspf=:\
*.pdf=:\
*.nix=:\
"
2020-05-16 17:57:01 +00:00
# Save history file in proper place
HISTFILE=~/.cache/zsh/history
2022-06-30 16:55:11 +00:00
# Load zplug from xdg dir
export ZPLUG_HOME="$XDG_DATA_HOME/zplug"
2020-06-12 10:13:27 +00:00
2020-05-16 17:57:01 +00:00
# Use alternative muhome
export MU_HOME="/home/alrayyes/.cache/mu"
# Needed to get zsh to play nice with emacs vterm
if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
alias clear='printf "\e]51;Evterm-clear-scrollback\e\\";tput clear'
fi
vterm_prompt_end() {
printf "\e]51;A$(whoami)@$(hostname):$(pwd)\e\\"
}
PROMPT=$PROMPT'%{$(vterm_prompt_end)%}'
# Make fzf use ripgrep if available
if type rg &> /dev/null; then
export FZF_DEFAULT_COMMAND='rg --files'
export FZF_DEFAULT_OPTS='-m --height 50% --border'
fi