1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-16 16:51:30 +01:00
dotfiles/brethil_dotfile.sh
2020-02-14 16:37:43 +01:00

50 lines
1.8 KiB
Bash
Executable File

# Check for update, set DISABLE_UPDATE_PROMPT=yes to disable the prompt and automatically update
env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT DOTFILES=$DOTFILES zsh -f $DOTFILES/check_for_update.sh
# oh-my-zsh plugins (some of these have to be installed by running install.sh or install_zsh_plugins, found in install.sh)
shared_plugins=(git alias-tips sudo common-aliases fast-syntax-highlighting zsh-autosuggestions colored-man-pages zsh-navigation-tools zsh_reload themes)
uname=$(uname -a)
if [[ $uname == *"Darwin"* ]]; then
if [[ $(which port) ]]; then
os_extra=(osx macports)
else
os_extra=(osx)
fi
elif [[ $uname == *"ARCH"* ]]; then
os_extra=(archlinux systemd)
elif [[ $uname == *"Debian"* ]]; then
os_extra=(debian)
fi
# Misc environment variables
# https://www.xkcd.com/378/
export EDITOR="vim"
export HISTSIZE=100000
export LANG=en_US.UTF-8
plugins=($shared_plugins $os_extra)
alias esource="$EDITOR $HOME/.zshrc"
alias resource="source $HOME/.zshrc"
alias dotedit="$EDITOR $DOTFILES/brethil_dotfile.sh"
# Custom definitions files
alias funedit="$EDITOR ~/.dotfiles_functions.sh"
alias aledit="$EDITOR ~/.dotfiles_aliases.sh"
# Extras
functions_file=$DOTFILES/functions.sh # Function definitions
aliases_file=$DOTFILES/aliases.sh # Aliases definitions
colors_file=$DOTFILES/colors.sh # Colors definitions
# Source extras
if [ -f $functions_file ]; then source $functions_file; else echo "[brethil-dotfiles] Couldn't load functions: $functions_file"; fi
if [ -f $aliases_file ]; then source $aliases_file; else echo "[brethil-dotfiles] Couldn't load aliases: $aliases_file"; fi
if [ -f $colors_file ]; then source $colors_file; else echo "[brethil-dotfiles] Couldn't load colors: $colors_file";fi
### SETUP PATHS ####
export PATH=$PATH:$HOME/bin