diff --git a/scripts/install_arch b/scripts/install_arch index 070b6a8..9ee48ee 100755 --- a/scripts/install_arch +++ b/scripts/install_arch @@ -1,35 +1,33 @@ #!/bin/bash -# -# install yay -# +# Full (probably) setup for arch -cd && +set -e + +# Install yay +cd if ! type "yay" &> /dev/null; then - echo "Yay not found, installing..." && + echo "Yay not found, installing..." if test -d yay; then rm -rf yay - fi && + fi - git clone https://aur.archlinux.org/yay.git && - cd yay && - makepkg -si --noconfirm && - cd && + git clone https://aur.archlinux.org/yay.git + cd yay + makepkg -si --noconfirm + cd rm -rf yay else echo -e "\nYay is already installed, skipping..." -fi && +fi - -# -# install deps -# - -echo -e "\nInstalling dependencies..." && +# Install deps +echo -e "\nInstalling dependencies..." yay -S --needed --noconfirm \ alacritty \ alsa-utils \ +awesome \ beautiful-discord-git \ bluez \ btop \ @@ -39,45 +37,35 @@ chromium \ discord \ fakeroot \ firefox-developer-edition \ -fuzzel \ gawk \ gimp \ -grim \ -i3bar-river \ -i3status-rust \ lf \ light \ -mako \ +maim \ +mosh \ +mpd \ neovim \ nnn \ oh-my-zsh-git \ otf-font-awesome \ -pamixer \ playerctl \ powerline-fonts \ -pulseaudio \ python-pywalfox \ pywal-discord-git \ -river \ rsync \ sl \ slurp \ spotify-launcher \ steam \ -swaybg \ +sxiv \ telegram-desktop \ thunderbird \ ttf-font-awesome \ upower \ wal-telegram-git \ -wl-clipboard \ +xclip \ zsh \ -&& - -# -# set shell -# - -echo "" && +# Set shell +echo "" sudo chsh -s /bin/zsh $USER diff --git a/scripts/install_min_fedora b/scripts/install_min_fedora index 15dfe07..ef8a71e 100755 --- a/scripts/install_min_fedora +++ b/scripts/install_min_fedora @@ -1,5 +1,9 @@ #!/bin/bash +# Minimal setup for Fedora + +set -e + cd sudo dnf -y install \ @@ -9,7 +13,6 @@ neovim \ byobu \ zsh \ nnn \ -kitty-terminfo \ mosh \ clang \ @@ -17,10 +20,12 @@ clang \ if ! test -d ~/.local/share/nvim/site/pack/packer/start/packer.nvim; then git clone --depth 1 https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim -fi && +fi # OhMyZsh if ! test -d .config/zsh/ohmyzsh; then sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -fi && +fi + +# Set shell sudo usermod -s /bin/zsh $USER diff --git a/scripts/install_min_ubuntu b/scripts/install_min_ubuntu index 6ec8d02..f01c085 100755 --- a/scripts/install_min_ubuntu +++ b/scripts/install_min_ubuntu @@ -1,35 +1,40 @@ #!/bin/bash +# Minimal setup for Ubuntu + +set -e + # Base sudo apt-get -y install \ btop \ byobu \ zsh \ sl \ - kitty-terminfo \ - nnn && + nnn -# neovim -sudo apt-get -y install software-properties-common && -sudo add-apt-repository -y ppa:neovim-ppa/stable && -sudo apt-get -y update && -sudo apt-get -y install neovim && -sudo apt-get -y install python3-dev python3-pip && -sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60 && -sudo update-alternatives --config vi && -sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60 && -sudo update-alternatives --config vim && -sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60 && -sudo update-alternatives --config editor && +# Neovim +sudo apt-get -y install software-properties-common +sudo add-apt-repository -y ppa:neovim-ppa/stable +sudo apt-get -y update +sudo apt-get -y install neovim +sudo apt-get -y install python3-dev python3-pip +sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60 +sudo update-alternatives --config vi +sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60 +sudo update-alternatives --config vim +sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60 +sudo update-alternatives --config editor # Packer if ! test -d ~/.local/share/nvim/site/pack/packer/start/packer.nvim; then git clone --depth 1 https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim -fi && +fi # OhMyZsh if ! test -d .config/zsh/ohmyzsh; then sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -fi && +fi + +# Set shell sudo chsh -s /bin/zsh $USER diff --git a/setup b/setup index caa90cb..6d97395 100755 --- a/setup +++ b/setup @@ -1,103 +1,80 @@ #!/bin/bash -# -# setup -# -clear - -# execute in less with a header for style points +set -e +# Execute in less with a header for style points exec > >(less +F --header 8) 2>&1 trap 'exec >&- 2>&-; wait' EXIT - -# grab said header - +# Grab said header curl -s https://old.doordesk.net/doors echo -e "Doors are sturdier than windows.\n-------------------------------------------------------" - - -# -# detect OS and run corresponding setup -# - +# Detect OS and run corresponding setup . /etc/os-release OS=$NAME echo -e "\nDetected OS as $OS" if [[ $OS == *Arch* ]]; then - cd && - echo "Enabling Pacman colors..." && - sudo sed '/Color/s/^#//' -i /etc/pacman.conf && + cd + echo "Enabling Pacman colors..." + sudo sed '/Color/s/^#//' -i /etc/pacman.conf - echo -e "\nVerifying base requirements..." && - sudo pacman -S --needed --noconfirm git base-devel && + echo -e "\nVerifying base requirements..." + sudo pacman -S --needed --noconfirm git base-devel if test -d .doors; then echo -e "\n$HOME/.doors found, checking for updates..." - cd .doors && git pull && cd + cd .doors + git pull + cd else echo -e "\n$HOME/.doors not found, creating..." git clone https://github.com/adoyle0/Doors.git .doors - fi && + fi $HOME/.doors/scripts/install_arch elif [[ $OS == *buntu* ]]; then - cd && - sudo apt-get -y install git rsync && - git clone https://github.com/adoyle0/Doors.git .doors && + cd + sudo apt-get -y install git rsync + git clone https://github.com/adoyle0/Doors.git .doors $HOME/.doors/scripts/install_min_ubuntu elif [[ $OS == *Fedora* ]]; then - cd && - sudo dnf install -y git rsync && - git clone https://github.com/adoyle0/Doors.git .doors && + cd + sudo dnf install -y git rsync + git clone https://github.com/adoyle0/Doors.git .doors $HOME/.doors/scripts/install_min_fedora fi - - -# -# copy configs -# - -echo -e "\nInstalling Configs..." && - cd $HOME/.doors/configs && +# Copy configs and make a backup if it already exists +echo -e "\nInstalling Configs..." + cd $HOME/.doors/configs for file in * do - echo -e "\n$file..." && + echo -e "\n$file..." cp -rbv $file $HOME/.config/ - done && - echo -e "\nLinking profile..." && - cp -sbv $HOME/.config/shell/profile ~/.zprofile && + done +# Link shell files and make a backup if it already exists +echo -e "\nLinking shell..." + cp -sbv $HOME/.config/shell/profile ~/.zprofile + cp -sbv $HOME/.config/x11/xinitrc ~/.xinitrc - -# -# copy scripts -# - -echo -e "\nInstalling Scripts..." && - cd $HOME/.doors && +# Copy scripts and make a backup if it already exists +echo -e "\nInstalling Scripts..." + cd $HOME/.doors if [ ! -d "$HOME/.local/bin" ]; then mkdir "$HOME/.local/bin" - fi && + fi - cp -rbv bin $HOME/.local && - - - -# -# wrap up -# + cp -rbv bin $HOME/.local +# Wrap up echo -e "\nDone!\nLog out and back in for changes to take effect." - -# give less time to catch up and tell it we're done - +# Give less time to catch up and tell it we're done sleep 1 && killall -s SIGINT less