Add autoinstall for packages (vim-plug, starship, ...)

This commit is contained in:
Tobias Reisinger 2022-09-13 21:28:05 +02:00
parent e448e719e8
commit 866bbcae20
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
5 changed files with 57 additions and 101 deletions

View file

@ -2,11 +2,13 @@ source "$HOME/.config/environment"
if [ ! -f "$ZSH/oh-my-zsh.sh" ]
then
echo "Installing oh-my-zsh"
RUNZSH="no" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" > /dev/null
rm "$HOME/.zshrc"
echo "Installing oh-my-zsh"
RUNZSH="no" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" > /dev/null
rm "$HOME/.zshrc"
fi
autoinstall-packages
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
@ -67,27 +69,40 @@ HIST_STAMPS="yyyy-mm-dd"
# Would you like to use another custom folder than $ZSH/custom?
ZSH_CUSTOM=$ZDOTDIR/custom
function omz_install_custom_plugin() {
plugin_path="$ZSH_CUSTOM/plugins/$1"
if [ ! -d "$plugin_path" ]
then
echo "Installing plugin $1"
git clone "$2" "$plugin_path" >/dev/null 2>&1
fi
}
omz_install_custom_plugin "zsh-syntax-highlighting" "https://github.com/zsh-users/zsh-syntax-highlighting.git"
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
'colored-man-pages'
'copypath'
'copyfile'
'cp'
'docker'
'docker-compose'
'extract'
'git'
'git-auto-status'
'jump'
'laravel5'
'rust'
'safe-paste'
'sudo'
'vi-mode'
'colored-man-pages'
'copypath'
'copyfile'
'cp'
'docker'
'docker-compose'
'extract'
'git'
'git-auto-status'
'jump'
'laravel5'
'rust'
'safe-paste'
'sudo'
'vi-mode'
'zsh-syntax-highlighting'
)
source $ZSH/oh-my-zsh.sh
@ -106,7 +121,4 @@ export SAVEHIST=1000000
export HISTSIZE=1000000
export HISTFILE="$HOME/.cache/zsh_history"
# Load zsh-syntax-highlighting; should be last.
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
[ -x "$(command -v starship)" ] && eval "$(starship init zsh)"