mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
84 lines
2.3 KiB
Bash
Executable File
84 lines
2.3 KiB
Bash
Executable File
# this is my zsh config. there are many like it, but this one is mine.
|
|
# shellcheck shell=bash
|
|
|
|
source "$DOTFILES/scripts/shared.sh"
|
|
|
|
export COMPLETION_WAITING_DOTS=true
|
|
|
|
path_append "/opt/homebrew/bin"
|
|
if type brew &> /dev/null; then
|
|
eval "$(brew shellenv)"
|
|
FPATH="$HOMEBREW_PREFIX/share/zsh/site-functions:${FPATH}"
|
|
fi
|
|
|
|
path_append "/usr/local/bin"
|
|
path_prepend "$XDG_DATA_HOME/cargo/bin"
|
|
path_prepend "$XDG_BIN_HOME"
|
|
path_prepend "$HOME/.local/go/bin"
|
|
path_prepend "$XDG_DATA_HOME/bob/nvim-bin"
|
|
|
|
source "$DOTFILES/config/exports-shell"
|
|
source "$DOTFILES/config/exports-apps"
|
|
source "$DOTFILES/config/alias"
|
|
source "$DOTFILES/config/functions"
|
|
|
|
export ZSH_CUSTOM_COMPLETION_PATH="$XDG_CONFIG_HOME/zsh/completion"
|
|
x-dc "$ZSH_CUSTOM_COMPLETION_PATH"
|
|
|
|
# Add completion scripts to zsh path
|
|
FPATH="$ZSH_CUSTOM_COMPLETION_PATH:$FPATH"
|
|
|
|
# Try to load antigen, if present
|
|
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
|
|
# shellcheck source=../../.local/bin/antigen.zsh
|
|
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
|
|
|
|
# antigen is present
|
|
antigen use oh-my-zsh
|
|
|
|
export ZSH_TMUX_AUTOSTART=true
|
|
export ZSH_TMUX_CONFIG="$DOTFILES/config/tmux/tmux.conf"
|
|
export ZSH_TMUX_UNICODE=true
|
|
export ZSH_TMUX_AUTOQUIT=false
|
|
export ZSH_TMUX_DEFAULT_SESSION_NAME=main
|
|
|
|
export NVM_DIR="$XDG_CONFIG_HOME/nvm"
|
|
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
|
|
|
# z, the zsh version
|
|
export ZSHZ_DATA="$XDG_STATE_HOME/z"
|
|
antigen bundle z
|
|
|
|
# these should be always available
|
|
antigen bundle tmux
|
|
antigen bundle colored-man-pages
|
|
antigen bundle command-not-found
|
|
antigen bundle ssh-agent
|
|
antigen bundle jreese/zsh-titles
|
|
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
|
antigen bundle zsh-users/zsh-completions
|
|
|
|
# these should be available if there's need
|
|
have brew && antigen bundle brew
|
|
have php && antigen bundle php
|
|
have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
|
|
|
# nvm is a strange beast
|
|
zstyle ':omz:plugins:nvm' autoload yes
|
|
antigen bundle nvm
|
|
# antigen bundle "$DOTFILES/config/zsh/plugins/nvm-auto-use"
|
|
|
|
# nice to have stuff
|
|
antigen bundle gcloud
|
|
|
|
# this needs to be the last item
|
|
antigen bundle zsh-users/zsh-syntax-highlighting
|
|
antigen apply
|
|
|
|
# shellcheck source=../config/fzf/fzf.zsh
|
|
[ -f "${DOTFILES}/config/fzf/fzf.zsh" ] \
|
|
&& source "${DOTFILES}/config/fzf/fzf.zsh"
|
|
|
|
# Start starship
|
|
eval "$(starship init zsh)"
|