#!/bin/sh # ==== DELETE THIS LINES ===== echo "NOTHING HAPPENED!" echo "FIRST READ THE SCRIPT!" exit # ============================ set -e prog="${0##*/}" config() { mkdir -p ~/.config mkdir -p ~/.local/bin cp -ir config/* ~/.config cp -i bin/* ~/.local/bin cp -i zprofile ~/.zprofile if [ -n "$ZSH_VERSION" ]; then echo "You are not using Zsh, set your default shell:" echo "$ chsh --shell /usr/bin/zsh" fi } install() { source /etc/os-release distro="${NAME:-${DISTRIB_ID}}" distro_install="" case $distro in "Arch Linux") distro_install="pacman -S --needed" ;; *) echo "Distro not supported"; exit ;; esac sudo $distro_install rofi alacritty i3 i3blocks zsh neovim tmux firefox \ base-devel xorg-xinit xwallpaper ttf-hack ttf-liberation dunst dash \ zathura zathura-pdf-poppler pulseaudio pamixer brightnessctl \ opendoas xorg-setxkbmap [[ "$?" -ne 0 ]] && exit echo "==================================" echo " Packages successfully installed " echo "==================================" } usage() { cat <<-_EOF $prog OPTION Options: config - copy configs and scripts to their location install - install required packages _EOF exit } case "$1" in config) config ;; install) install ;; *) usage ;; esac