You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

90 lines
2.4 KiB

#!/usr/bin/env bash
# Installer fish, nvim, tmux, curl, fonts-powerline
readonly DOTFILES="${HOME}/.config/dotfiles"
function delete {
if [ -f $1 ] || [ -d $1 ] || [ -L $1 ]
then rm -rf $1
fi
}
# Clone le depot.
# delete "$DOTFILES"
# git clone https://git.daiko.fr/daiko/dotfiles.git "$DOTFILES"
#
# Installation et configuration de Fish
########################################
delete "$HOME/.config/fish"
delete "$HOME/.config/fisherman"
delete "$HOME/.cache/fisherman"
# evite un message d'erreur si composer n'est pas configuré globalement.
mkdir -p "$HOME/.composer/vendor/bin"
# Installation de Fisherman
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
fish -c "fisher add daiko/shellder"
# Ajoute le $PATH pour PIP
ln -s "$DOTFILES/config/fish/conf.d/pip_path.fish" "$HOME/.config/fish/conf.d/pip_path.fish"
# Change le shell par défaut.
sudo chsh -s /usr/bin/fish "$USER"
function configure_git() {
delete "$HOME/.gitconfig"
git config --global push.default simple
git config --global user.email "daiko@daiko.fr"
git config --global user.name "daiko"
git config pull.rebase
}
function configure_i3() {
local HOSTNAME=`hostname`
delete "$HOME/.config/i3"
delete "$HOME/.config/polybar"
delete "$HOME/.config/rofi"
ln -s "$DOTFILES/config/i3" "$HOME/.config/i3"
ln -s "$DOTFILES/config/polybar" "$HOME/.config/polybar"
ln -s "$DOTFILES/config/rofi" "$HOME/.config/rofi"
ln -s "${DOTFILES}/config/i3/config.${HOSTNAME}" "${DOTFILES}/config/i3/config"
}
#
# Configuration de Alacritty
#############################
delete "$HOME/.config/alacritty"
ln -s "$DOTFILES/config/alacritty" "$HOME/.config/alacritty"
#
# Installation et configuration de Neovim
#########################################
NVIM_FOLDER="$HOME/.config/nvim"
# Supprime les anciens fichiers de configuration
delete $NVIM_FOLDER
# Créé les liens vers les fichiers de configuration
cd "$HOME"
mkdir -p "$NVIM_FOLDER"
ln -s "$DOTFILES/config/nvim/init.nvim" "$NVIM_FOLDER/init.vim"
ln -s "$DOTFILES/config/nvim/colors" "$NVIM_FOLDER/colors"
# Spécifique VIM : installation de Plug.vim
curl -fLo "$NVIM_FOLDER/autoload/plug.vim" --create-dirs \
"https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
# Installation des plugins
/usr/bin/env nvim +PlugInstall +qall
# Ajoute la configuration de autorandr
ln -s "${DOTFILES}/config/autorandr" "${HOME}/.config/"