Add conditions to some init stuff

This commit is contained in:
Alexander Rosenberg 2025-02-16 20:52:45 -08:00
parent e6fdd25097
commit ed1ccdcaec
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -83,6 +83,11 @@ elif [[ -v INSIDE_EMACS ]]; then
alias e='emacsclient '
alias emacs='emacsclient '
alias n='emacsclient '
elif [[ -v DISTROBOX_ENTER_PATH ]]; then
alias EDITOR=nvim
alias n=nvim
alias e=nvim
alias emacs=nvim
else
export EDITOR='emacsclient -a nvim -nw'
# Because I keep using n by mistake
@ -196,7 +201,7 @@ function overwrite-mode {
zle -N overwrite-mode
# Fancy prompt (starship)
eval "$(starship init zsh)"
cmd_exists starship && eval "$(starship init zsh)"
# Change cursor shape for different vi modes.
function __zsh_vim_key_prompt_handler {
SPACESHIP_CHAR_SYMBOL=""
@ -250,10 +255,12 @@ if cmd_exists pyenv; then
fi
# Bookmarks
if cmd_exists emacs; then
[[ -v BM_CWD_LS ]] || BM_CWD_LS=1
[[ -v BM_MODE ]] || BM_MODE=daemon
[[ -v BM_AUTO_RELOAD ]] || BM_AUTO_RELOAD=1
source "${ZSH_CONFIG_DIR}/emacs-bookmark.zsh"
fi
# Platform specific stuff
[ -f /usr/bin/pacman ] && source "${ZSH_CONFIG_DIR}/arch.zsh"