#!/usr/bin/bash

# On Artix Linux install artix-archlinux-support before running the script

sudo pacman -S --needed wpa_supplicant networkmanager ttf-joypixels iw dhcpcd adobe-source-code-pro-fonts falkon libnotify dunst picom light feh xorg xorg-xinit pulseaudio
clear

# Sets variables here
dwm="dwm-6.2"
st="st"
dmenu="dmenu-5.0"

echo "Welcome to the sarc installation"
echo ""

echo "What theme do you want to use? Current themes are down below:"
echo
ls themes/
echo
echo "Enter what theme you want here:" && read theme
echo 
echo "Theme is $theme"
pwd
cp themes/$theme theme.h

cd $dwm
make clean
make -s
sudo make -s install

cd ../dwmblocks
make -s
sudo make -s install

cd ../$st
make clean
make -s
sudo make -s install

cd ../$dmenu
make -s
sudo make -s install

cd ..
mkdir ~/.config/

cp etc/.xinitrc ~
cp etc/wallpaper/$theme.wallpaper.jpg ~/.config/wallpaper.jpg

sudo cp bin/* /usr/local/bin
rm theme.h

echo
tput setaf 2 && echo "Installation is complete!"
