dotfiles/config/zsh/.zshrc

71 lines
1.6 KiB
Bash
Raw Normal View History

2024-06-19 16:19:39 +02:00
# mac specific configuration
2024-06-19 23:32:59 +02:00
if [[ $(uname -s) = "Darwin" ]]; then
touch $HOME/.hushlogin
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
2023-10-20 14:34:48 +02:00
2023-04-28 02:11:31 +02:00
# prepare directories
mkdir -p $XDG_CACHE_HOME/zsh
2023-07-19 15:11:07 +02:00
mkdir -p $XDG_DATA_HOME/zsh
2023-04-28 02:11:31 +02:00
2021-01-28 00:59:49 +01:00
# global exports and options
2021-05-11 14:24:48 +02:00
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_SAVE_NO_DUPS
setopt HIST_REDUCE_BLANKS
2021-05-11 15:17:44 +02:00
setopt SHARE_HISTORY
2022-07-23 17:29:49 +02:00
setopt INC_APPEND_HISTORY
2021-05-11 14:24:48 +02:00
2023-07-19 15:11:07 +02:00
# set path
2023-05-28 14:42:21 +02:00
path=(~/.local/bin "$path[@]")
2023-04-28 02:11:31 +02:00
# source configuration
source $ZDOTDIR/aliases.zsh
2023-04-28 02:11:31 +02:00
source $ZDOTDIR/cleanhome.zsh
2024-06-19 16:19:39 +02:00
source $ZDOTDIR/fzf.zsh
2023-04-28 02:11:31 +02:00
source $ZDOTDIR/keys.zsh
2021-09-06 12:37:22 +02:00
2023-04-28 02:11:31 +02:00
# source modules
2023-10-14 23:59:02 +02:00
source ~/.local/git/zsh_modules/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
source ~/.local/git/zsh_modules/wd/wd.plugin.zsh
2022-03-31 01:17:08 +02:00
export WD_CONFIG=$XDG_CONFIG_HOME/wd_list
2023-07-17 22:25:49 +02:00
2023-07-19 15:11:07 +02:00
# set fpath
2023-10-14 23:59:02 +02:00
fpath=(~/.local/git/zsh_modules/wd $fpath)
2022-03-30 11:58:54 +02:00
2023-04-28 02:11:31 +02:00
# theme and colors
2023-05-03 01:34:27 +02:00
if [[ $(command -v vivid) ]]; then
export LS_COLORS=$(vivid generate molokai)
else
unset LS_COLORS
fi
2023-04-28 02:11:31 +02:00
tabs 2
2024-05-22 17:43:38 +02:00
export STARSHIP_CACHE="$XDG_CACHE_HOME"/starship
eval "$(STARSHIP_CACHE="$XDG_CACHE_HOME"/starship starship init zsh)"
2023-04-28 02:11:31 +02:00
# completion
zstyle ':completion:*' menu select
zstyle ':completion:*' list-colors ''
autoload -Uz compinit
2023-05-03 01:34:27 +02:00
if [ ! -e $XDG_DATA_HOME/zsh/zcompdump.zwc ]; then
autoload -Uz zrecompile
zrecompile -p -R $XDG_DATA_HOME/zsh/zcompdump
fi
2023-04-28 02:11:31 +02:00
if [[ -n $XDG_DATA_HOME/zsh/zcompdump(#qN.mh+24) ]]; then
compinit -d $XDG_DATA_HOME/zsh/zcompdump
else
compinit -C -d $XDG_DATA_HOME/zsh/zcompdump
2022-06-28 13:52:51 +02:00
fi
# quick note functionality
2023-05-03 01:34:27 +02:00
if [[ -f ~/.note ]]; then
2022-04-12 17:48:35 +02:00
echo
cat ~/.note
echo
fi
# local settings
2023-05-03 01:34:27 +02:00
if [[ -f ~/.local/config/zsh ]]; then
source ~/.local/config/zsh
fi