Add per distribution setup settings

This commit is contained in:
Tanguy Herbron 2021-08-02 17:26:38 +02:00
parent d935345c8a
commit 713b9afb14

View File

@ -1,5 +1,43 @@
#!/bin/bash #!/bin/bash
trap "exit" SIGINT
FONT_NORMAL="0"
FONT_BOLD="1"
FONT_DIM="2"
FONT_ITALIC="3"
FG_BLACK="30"
FG_RED="31"
FG_GREEN="32"
FG_YELLOW="33"
FG_BLUE="34"
FG_MAGENTA="35"
FG_CYAN="36"
FG_WHITE="37"
BG_BLACK="40"
BG_RED="41"
BG_GREEN="42"
BG_YELLOW="43"
BG_BLUE="44"
BG_MAGENTA="45"
BG_CYAN="46"
BG_WHITE="47"
highlight() {
printf "\x1b[1;34m"
}
print_reset() {
printf "\x1b[0m"
}
install_debian() {
echo "Not yet implemented"
}
install_arch () {
###################### Specific to Arch based distributions ###################### ###################### Specific to Arch based distributions ######################
## Install needed packages ## Install needed packages
# WM : bspwm sxhkd xorg-xinit xorg-server xorg-randr xterm alacritty # WM : bspwm sxhkd xorg-xinit xorg-server xorg-randr xterm alacritty
@ -9,13 +47,17 @@
# Yay dep : base-devel # Yay dep : base-devel
# CLI bitwarden integration : bitwarden-cli jq fzf # CLI bitwarden integration : bitwarden-cli jq fzf
# Rofi bitwarden integration : bitwarden-cli bitwarden-rofi # Rofi bitwarden integration : bitwarden-cli bitwarden-rofi
sudo pacman -S bspwm sxhkd xorg-xinit xorg-server xorg-xrandr xterm alacritty \ # Vim plugin dependencies : the_silver_searcher
echo -n "Installing required packages using" ; highlight ; echo " Pacman " ; print_reset ; "\n"
sudo pacman ---quiet -S --needed bspwm sxhkd xorg-xinit xorg-server xorg-xrandr xterm alacritty \
feh w3m \ feh w3m \
nerd-fonts-meslo \ nerd-fonts-meslo \
git tmux \ git tmux \
base-devel \ base-devel \
bitwarden-cli jq fzf \ bitwarden-cli jq fzf \
bitwarden-rofi bitwarden-rofi \
the_silver_searcher
## Install yay ## Install yay
git clone https://aur.archlinux.org/yay.git /tmp/yay git clone https://aur.archlinux.org/yay.git /tmp/yay
@ -24,6 +66,19 @@ makepkg -si
## Install AUR packages ## Install AUR packages
yay -S polybar pulseaudio-control eww-git yay -S polybar pulseaudio-control eww-git
}
arch="$(lsb_release -si)"
case $arch in
Arch)
install_arch
;;
Raspbian)
;&
Debian)
install_debian
esac
###################### Distribution agnostic ###################### ###################### Distribution agnostic ######################
@ -31,6 +86,9 @@ yay -S polybar pulseaudio-control eww-git
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
## Once vimplug is installed, install all plugins automatically
/usr/bin/nvim +VimEnter +PlugInstall +qall
## Install tmux plugin manager ## Install tmux plugin manager
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm