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
|
|
|
|
path_if_exists ~/.config/yarn/global/node_modules/.bin
|
|
|
|
path_if_exists ~/.local/bin
|
|
|
|
path_if_exists ~/.emacs.d/bin
|
2020-06-07 18:17:21 +00:00
|
|
|
path_if_exists ~/.local/share/go/bin
|
|
|
|
path_if_exists ~/.local/share/cargo/bin
|
2020-05-16 17:57:01 +00:00
|
|
|
|
|
|
|
# Set GPG TTY
|
|
|
|
export GPG_TTY="$(tty)"
|
|
|
|
|
|
|
|
# Set default browser
|
|
|
|
if [ -e "/usr/bin/brave" ]; then
|
|
|
|
export BROWSER="brave"
|
|
|
|
else
|
|
|
|
if [ -e "/usr/bin/firefox" ]; then
|
|
|
|
export BROWSER="firefox"
|
|
|
|
elif [ -e "/usr/bin/iceweasel" ]; then
|
|
|
|
export BROWSER="iceweasel"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Set default terminal
|
|
|
|
export TERMINAL="alacritty"
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# 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"
|
|
|
|
|
2020-06-07 18:17:21 +00:00
|
|
|
# Rust
|
|
|
|
export CARGO_HOME=~/.local/share/cargo
|
|
|
|
export RUSTUP_HOME=~/.local/share/rustup
|
|
|
|
|
|
|
|
# Golang
|
|
|
|
export GOPATH=~/.local/share/go
|
2020-06-01 15:34:40 +00:00
|
|
|
|
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=:\
|
|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
|
*.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
|
|
|
|
|
2020-06-12 10:13:27 +00:00
|
|
|
# Load config files from their proper place
|
|
|
|
ZDOTDIR=~/.config/zsh
|
|
|
|
|
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)%}'
|