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

71 lines
1.9 KiB
Bash
Raw Normal View History

2017-07-14 21:20:20 +02:00
# Check for update, set DISABLE_UPDATE_PROMPT=yes to disable the prompt and automatically update
2017-08-08 10:52:00 +02:00
env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT DOTFILES=$DOTFILES zsh -f $DOTFILES/check_for_update.sh
2017-07-14 21:20:20 +02:00
# antigen plugins
antigen_plugins="git
common-alias
sudo
zsh-navigation-tools
colored-man-pages
zdharma/fast-syntax-highlighting
zsh-users/zsh-autosuggestions
2020-02-14 16:37:47 +01:00
djui/alias-tips
"
2017-07-14 21:20:20 +02:00
uname=$(uname -a)
if [[ $uname == *"Darwin"* ]]; then
os_extra="osx"
elif [[ $uname == *"ARCH"* || $uname == *"MANJARO"* ]]; then
os_extra="archlinux systemd"
2017-07-14 21:20:20 +02:00
elif [[ $uname == *"Debian"* ]]; then
os_extra="debian systemd"
2017-06-12 16:22:05 +02:00
fi
plugins="$antigen_plugins $os_extra"
antigen use oh-my-zsh
antigen bundles <<EOBUNDLES
$plugins
EOBUNDLES
theme=brethil
antigen theme $theme
antigen apply
2020-02-14 16:37:49 +01:00
# Enable zsh autocorrection
setopt CORRECT_ALL
2020-02-14 16:37:43 +01:00
# Misc environment variables
2017-07-17 02:00:15 +02:00
# https://www.xkcd.com/378/
export EDITOR="vim"
2020-02-14 16:37:43 +01:00
export HISTSIZE=100000
export LANG=en_US.UTF-8
if [[ $SSH_CLIENT ]]; then
export SSH_AUTH_SOCK=$HOME/.ssh/ssh_auth_sock
fi
2020-02-14 16:37:43 +01:00
2017-07-17 02:00:15 +02:00
alias esource="$EDITOR $HOME/.zshrc"
2017-07-14 21:20:20 +02:00
alias resource="source $HOME/.zshrc"
alias dotedit="$EDITOR $DOTFILES/brethil_dotfile.sh"
2017-07-17 02:00:15 +02:00
# Custom definitions files
alias funedit="$EDITOR ~/.dotfiles_functions.sh"
alias aledit="$EDITOR ~/.dotfiles_aliases.sh"
2017-06-12 16:22:05 +02:00
# Extras
functions_file=$DOTFILES/functions.sh # Function definitions
aliases_file=$DOTFILES/aliases.sh # Aliases definitions
colors_file=$DOTFILES/colors.sh # Colors definitions
# Source extras
2017-07-17 02:00:15 +02:00
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
2017-07-17 02:00:15 +02:00
if [ -f $colors_file ]; then source $colors_file; else echo "[brethil-dotfiles] Couldn't load colors: $colors_file";fi
2017-06-12 16:22:05 +02:00
### SETUP PATHS ####
2017-07-14 21:20:20 +02:00
export PATH=$PATH:$HOME/bin