#!/usr/bin/env bash set -euo pipefail # check if user is root if [ "$EUID" -ne 0 ]; then sudo -v fi cat <&1 >/dev/tty) clear for choice in $choices; do case $choice in 1) echo "nyarch" >"$HOME/.seltheme" ;; 2) echo "space-pink" >"$HOME/.seltheme" ;; esac done } echo cat </dev/null # make sure to use master branch cd config git checkout master &>/dev/null cd .. # check if the install scripts are the same # NOTE Arguments get passed automatically now if ! cmp --silent "$HOME/scripts/arch-config.sh" "$HOME/config/scripts/arch-config.sh"; then echo Removed old config file and launched new one. rm "$HOME/scripts/arch-config.sh" && cp "$HOME/config/scripts/arch-config.sh" "$HOME/scripts/" && bash ~/scripts/arch-config.sh "$@" fi # if no seltheme file exists, ask to select a theme if [[ ! -f "$HOME/.seltheme" ]]; then func_seltheme fi #################### #### Arguments #### #################### # handle arguments if [[ "$#" -eq 1 ]]; then # -t/--theme to change theme if [[ "$1" == "-t" || "$1" == "--theme" ]]; then func_seltheme elif [[ "$1" == "-h" || "$1" == "--help" ]]; then echo "-h, --help Show help menu" echo "-t, --theme Show theme selection screen" fi elif [[ "$#" -gt 1 ]]; then echo "Too many arguments" exit 1 fi echo cat </dev/null seltheme="$(cat "$HOME/.seltheme")" if [[ "$seltheme" == "nyarch" ]]; then #cp -r "./themes/nyarch/i3" "$HOME/.config/" cat "./themes/nyarch/i3/color" >>"$HOME/.config/i3/config" cp -r "./themes/nyarch/polybar" "$HOME/.config/" #cp -r "./themes/nyarch/neofetch/lowpoly_flamegirl_blue.txt" "$HOME/.config/neofetch/lowpoly_flamegirl.txt" #cp "./themes/.fehbg-nyarch" "$HOME/.fehbg" #sed -i 's/^NAME=".*"/NAME="Rawrch Linyux"/' /etc/os-release elif [[ "$seltheme" == "space-pink" ]]; then #cp -r "./themes/space-pink/i3" "$HOME/.config/" cat "./themes/space-pink/i3/color" >>"$HOME/.config/i3/config" cp -r "./themes/space-pink/polybar" "$HOME/.config/" #cp -r "./themes/space-pink/neofetch/lowpoly_flamegirl_orange.txt" "$HOME/.config/neofetch/lowpoly_flamegirl.txt" #cp "./themes/.fehbg-space-pink" "$HOME/.fehbg" fi rm -rf ./themes # make fehbg executable chmod +x ~/.fehbg #################### ##### Bash Cat ##### #################### # download cat as cat echo "Installing bash cat" git clone https://github.com/RealStickman/bash-cat-with-cat.git &>/dev/null cp ./bash-cat-with-cat/cat.sh "$HOME/scripts/pieces/cat.sh" rm -rf ./bash-cat-with-cat #################### ##### PSIPCalc ##### #################### # download ip-calculator with powershell echo "Installing powershell ip calculator" git clone https://github.com/RealStickman/PSipcalc &>/dev/null cp ./PSipcalc/PSipcalc.ps1 "$HOME/scripts/in_path/sc-psipcalc" rm -rf ./PSipcalc #################### ####### Gimp ####### #################### #gimp plugins #mkdir ~/.config/GIMP/ || echo Not creating directory #mkdir ~/.config/GIMP/2.10/ || echo Not creating directory #mkdir -p ~/.config/GIMP/2.10/plug-ins/ || echo Not creating directory #rsync -ah ~/config/gimp-plugins/* ~/.config/GIMP/2.10/plug-ins/ echo cat </dev/null sudo chgrp vmware /dev/vmnet* sudo chmod g+rw /dev/vmnet* fi # set group for libvirt if [[ $(pacman -Q | grep libvirt) ]]; then echo "Setting group for libvirt" sudo gpasswd -a "$USER" libvirt 1>/dev/null fi # set group for wireshark (only if installed) if [[ $(pacman -Q | grep wireshark-qt) ]]; then echo "Setting up group for wireshark" sudo groupadd -f wireshark sudo gpasswd -a "$USER" wireshark 1>/dev/null fi # add group for corectrl if [[ $(pacman -Q | grep corectrl) ]]; then echo "Setting up group for corectrl" sudo groupadd -f corectrl sudo gpasswd -a "$USER" corectrl 1>/dev/null fi # group for controlling backlight echo "Setting group for backlight" sudo groupadd -f video sudo gpasswd -a "$USER" video 1>/dev/null # group for monitoring wireguard echo "Setting group for wireguard" sudo groupadd -f wireguard sudo gpasswd -a "$USER" wireguard 1>/dev/null echo cat < temp && mv temp "$HOME/.ssh/config" #fi # set permissions for sudoers.d to root only sudo chown root:root -R /etc/sudoers.d/ sudo chmod 600 -R /etc/sudoers.d/ # unzip gimp plugins #echo Unzipping gimp plugins #unzip -o ~/.config/GIMP/2.10/plug-ins/export_layers-3.3.1.zip -d ~/.config/GIMP/2.10/plug-ins/ >/dev/null #rm ~/.config/GIMP/2.10/plug-ins/export_layers-3.3.1.zip >/dev/null # xfce settings # disable screensaver & locker /usr/bin/xfconf-query -c xfce4-session -n -t bool -p /startup/screensaver/enabled -s false #make bash scripts executable chmod +x -R ~/.config/polybar/ chmod +x -R ~/.config/i3/scripts chmod +x -R ~/scripts # make applications executable chmod +x -R ~/.local/share/applications # set settings for nemo bash ~/config/scripts/nemo-config.sh #remove downloaded folder rm -rf ~/config echo cat </dev/null; then i3-msg restart 1>/dev/null fi echo cat <