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

58 lines
1.2 KiB
Plaintext
Raw Normal View History

2020-02-08 14:14:11 +00:00
path_if_exists() {
if [[ -d $1 ]]; then
export PATH="$1:$PATH"
fi
}
# Stop tmux bitching about 256 colours
TERM="xterm-256color"
2020-02-04 13:48:42 +00:00
# PATH
2020-02-08 14:14:11 +00:00
path_if_exists ~/.config/yarn/global/node_modules/.bin
path_if_exists ~/.local/bin
path_if_exists ~/.emacs.d/bin
# Set GPG TTY
export GPG_TTY="$(tty)"
# Set default browser
2020-02-04 13:48:42 +00:00
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
2020-02-02 11:19:40 +00:00
export TERMINAL="alacritty"
# pkg editor
2019-06-12 10:53:42 +00:00
export VISUAL="nvim"
# editor
export EDITOR="nvim"
# Enable password store extensions
export PASSWORD_STORE_ENABLE_EXTENSIONS="true"
2019-09-30 14:34:53 +00:00
2019-12-10 12:40:20 +00:00
# This needs to be set for bspwm to see config
export XDG_CONFIG_HOME="$HOME/.config"
2019-09-30 14:34:53 +00:00
# Save history file in proper place
HISTFILE=~/.cache/zsh/history
2019-11-23 14:39:18 +00:00
2019-12-04 23:44:32 +00:00
# Use alternative muhome
2019-11-23 14:39:18 +00:00
export MU_HOME="/home/alrayyes/.cache/mu"
2019-12-04 18:49:18 +00:00
# Needed to get zsh to play nice with emacs vterm
if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
2020-02-04 13:48:42 +00:00
alias clear='printf "\e]51;Evterm-clear-scrollback\e\\";tput clear'
2019-12-04 18:49:18 +00:00
fi
vterm_prompt_end() {
2020-02-04 13:48:42 +00:00
printf "\e]51;A$(whoami)@$(hostname):$(pwd)\e\\"
2019-12-04 18:49:18 +00:00
}
PROMPT=$PROMPT'%{$(vterm_prompt_end)%}'