dotfiles/zshrc

69 lines
1.6 KiB
Bash
Raw Normal View History

2021-12-29 19:14:18 +01:00
# vim:sts=2:sw=2:ft=zsh
2021-12-30 00:18:22 +01:00
# Base directories for dotfiles.
export DOTFILES=${HOME}/.dotfiles
2023-12-29 18:13:16 +01:00
# Autocompletions
2022-01-01 01:03:34 +01:00
export FPATH=${DOTFILES}/zsh/functions:${FPATH}
2021-12-30 00:18:22 +01:00
2021-12-30 01:15:29 +01:00
# Base autoloading
2022-01-01 01:03:34 +01:00
autoload -Uz compaudit compinit
2021-12-30 01:15:29 +01:00
compinit
2021-12-29 19:14:18 +01:00
# zsh packages from system
source ${DOTFILES}/zsh/distro.base.zsh
2021-12-29 19:14:18 +01:00
# Plugins
for plugin in `find $DOTFILES/zsh/plugins -iname \*.plugin.zsh -print`; do
if [ -f /etc/redhat-release ]; then
if [ "$(basename ${plugin})" != 'fzf.plugin.zsh' ]; then
source $plugin
fi
else
source $plugin
fi
done
2021-12-29 19:14:18 +01:00
# Antigen configuration
# the main pluing should have been sourced in the previous loop.
antigen bundle command-not-found
antigen bundle common-aliases
antigen bundle copyfile
antigen bundle fd
antigen bundle fzf
antigen bundle git
antigen bundle pip
antigen bundle python
antigen bundle rsync
antigen bundle sudo
antigen bundle systemadmin
antigen bundle systemd
antigen bundle z
antigen apply
2021-12-29 19:14:18 +01:00
# EDITOR
export EDITOR="/usr/bin/vim"
2023-05-01 01:42:17 +02:00
export ZSH_TMUX_CONFIG=${HOME}/.config/tmux/tmux.conf
2021-12-29 19:14:18 +01:00
# FZF default options
2022-01-01 01:03:34 +01:00
[ -x `which fzf 2>/dev/null` ] && export FZF_DEFAULT_OPTS="--multi --no-mouse --ansi --color=dark"
2021-12-29 19:14:18 +01:00
2023-12-29 18:13:16 +01:00
# Use Powerlevel10k if already found
if [[ -f ~/.p10k.zsh ]]; then
source ~/.p10k.zsh
fi
2021-12-29 19:14:18 +01:00
# Loading rvm if exists
[ -f /etc/profile.d/rvm.sh ] && source /etc/profile.d/rvm.sh
# Loading additional aliases
for file in `find $DOTFILES/zsh/aliases -iname \*.aliases.zsh -print`; do
2021-12-30 01:22:40 +01:00
source $file
done
if [[ -d $HOME/.zsh/conf.d ]]; then
for file in `find $HOME/.zsh/conf.d -type f -iname \*.zsh -print | sort`; do
source file
done
fi