2022-04-17 21:14:14 +02:00
|
|
|
# Path to your dotfiles.
|
|
|
|
export DOTFILES=$HOME/.dotfiles
|
2022-04-17 18:39:47 +02:00
|
|
|
|
2022-04-17 20:52:22 +02:00
|
|
|
# Load extra files
|
2022-04-17 19:47:21 +02:00
|
|
|
source $DOTFILES/zsh/aliases.zsh
|
2022-04-17 20:52:22 +02:00
|
|
|
source $DOTFILES/zsh/path.zsh
|
|
|
|
|
|
|
|
# Load macos specific configs
|
|
|
|
if [[ $OSTYPE == 'darwin'* ]]; then
|
|
|
|
source $DOTFILES/macos/path.zsh
|
|
|
|
fi
|
2022-04-17 19:47:21 +02:00
|
|
|
|
2022-02-23 00:23:40 +01:00
|
|
|
# Load zsh-snap (znap) plugin manager
|
|
|
|
zstyle ':znap:*' repos-dir ~/.znap
|
2022-02-23 00:51:04 +01:00
|
|
|
source ~/.znap/znap/znap.zsh
|
2018-08-18 13:15:18 +02:00
|
|
|
|
2022-04-17 21:00:39 +02:00
|
|
|
# Helper Functions
|
|
|
|
# Returns whether the given command is executable or aliased.
|
|
|
|
_has() {
|
|
|
|
return $( whence $1 >/dev/null )
|
|
|
|
}
|
|
|
|
|
2022-04-17 19:47:21 +02:00
|
|
|
# autocomplete settings
|
|
|
|
zstyle ':autocomplete:tab:*' widget-style menu-select
|
|
|
|
zstyle ':autocomplete:*' fzf-completion yes
|
|
|
|
zstyle ':autocomplete:*' min-input 2
|
|
|
|
|
2022-02-23 00:23:40 +01:00
|
|
|
# Plugins
|
|
|
|
znap source ohmyzsh/ohmyzsh lib/{git,theme-and-appearance}
|
|
|
|
znap source ohmyzsh/ohmyzsh plugins/{per-directory-history,git}
|
2022-02-23 00:24:16 +01:00
|
|
|
znap source marlonrichert/zcolors
|
|
|
|
znap source marlonrichert/zsh-autocomplete
|
|
|
|
znap source zsh-users/zsh-autosuggestions
|
|
|
|
znap source zsh-users/zsh-syntax-highlighting
|
|
|
|
znap source jessarcher/zsh-artisan
|
|
|
|
znap source unixorn/fzf-zsh-plugin
|
|
|
|
|
|
|
|
# Extra init code needed for zcolors.
|
|
|
|
znap eval zcolors "zcolors ${(q)LS_COLORS}"
|
|
|
|
|
2022-02-23 00:59:55 +01:00
|
|
|
# ZSH prompt
|
|
|
|
if _has starship;
|
|
|
|
then
|
|
|
|
znap eval starship 'starship init zsh --print-full-init'
|
|
|
|
else
|
|
|
|
echo "You should try installing the starship prompt 🚀"
|
|
|
|
znap prompt ohmyzsh/ohmyzsh robbyrussell
|
|
|
|
fi
|
2018-12-07 12:15:50 +01:00
|
|
|
|
2019-01-19 14:47:24 +01:00
|
|
|
# localcommands
|
2022-04-17 18:39:47 +02:00
|
|
|
if [ -f $DOTFILES/zsh/localcommands ]
|
2018-08-18 13:15:18 +02:00
|
|
|
then
|
2022-04-17 18:39:47 +02:00
|
|
|
source $DOTFILES/zsh/localcommands
|
2018-08-18 13:15:18 +02:00
|
|
|
fi
|