modular setup

This commit is contained in:
Adam 2024-01-07 02:24:12 -05:00
parent 6ae955bef7
commit d3974332a6
3 changed files with 109 additions and 63 deletions

View file

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
set -e
# Copy configs and make a backup if it already exists # Copy configs and make a backup if it already exists
echo -e "\nInstalling Configs..." echo -e "\nInstalling Configs..."
for file in configs/* for file in configs/*
@ -21,4 +23,3 @@ cp -rbv bin $HOME/.local
echo -e "\nLinking shell..." echo -e "\nLinking shell..."
cp -sbv $HOME/.config/shell/profile ~/.zprofile cp -sbv $HOME/.config/shell/profile ~/.zprofile
cp -sbv $HOME/.config/x11/xinitrc ~/.xinitrc cp -sbv $HOME/.config/x11/xinitrc ~/.xinitrc

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
# Full (probably) setup for arch # Full (probably) setup for arch
@ -7,6 +7,7 @@ set -e
# Install yay # Install yay
cd cd
if ! type "yay" &> /dev/null; then if ! type "yay" &> /dev/null; then
echo "Yay not found, installing..." echo "Yay not found, installing..."
if test -d yay; then if test -d yay; then
@ -22,65 +23,89 @@ else
echo -e "\nYay is already installed, skipping..." echo -e "\nYay is already installed, skipping..."
fi fi
# Install deps # Install base shell
echo -e "\nInstalling dependencies..." if [ $1 -ge 1 ]; then
echo -e "\nInstalling base shell..."
yay -S --needed --noconfirm \
bat \
btop \
byobu \
fd \
fzf \
gimp \
man-db \
man-pages \
mosh \
neovim \
nnn \
oh-my-zsh-git \
rar \
ripgrep \
rsync \
sl \
wget \
zsh \
fi
# Install basic GUI
if [ $1 -ge 2 ]; then
echo -e "\nInstalling basic GUI..."
yay -S --needed --noconfirm \ yay -S --needed --noconfirm \
alacritty \ alacritty \
alsa-utils \ alsa-utils \
arandr \ arandr \
awesome \ awesome \
bat \
beautiful-discord-git \
bluez \ bluez \
btop \
byobu \
caprine \
chromium \ chromium \
discord \
firefox-developer-edition \ firefox-developer-edition \
fzf \
gimp \
lf \
light \ light \
maim \ maim \
man-db \
man-pages \
mosh \
mpd \ mpd \
neovim \
nitrogen \
nnn \
nvim-packer-git \
oh-my-zsh-git \
otf-font-awesome \ otf-font-awesome \
picom \ picom \
playerctl \ playerctl \
polkit-gnome \ polkit-gnome \
powerline-fonts \ powerline-fonts \
python-pywal \ python-pywal \
python-pywalfox \
pywal-discord-git \
rar \
redshift \ redshift \
ripgrep \
rsync \
sl \
spotify-launcher \
steam \
sxiv \ sxiv \
telegram-desktop \
thunderbird \
ttf-font-awesome \ ttf-font-awesome \
unclutter \ unclutter \
upower \ upower \
wal-telegram-git \
wget \
xclip \ xclip \
xorg-server \ xorg-server \
xorg-xinit \ xorg-xinit \
xorg-xrandr \ xorg-xrandr \
zsh \
fi
# Install extras
if [ $1 -ge 3 ]; then
echo -e "\nInstalling extras..."
yay -S --needed --noconfirm \
beautiful-discord-git \
caprine \
discord \
python-pywalfox \
pywal-discord-git \
spotify-launcher \
steam \
telegram-desktop \
thunderbird \
wal-telegram-git \
fi
# Set shell # Set shell
echo "" echo ""
if [ $SHELL == "/bin/zsh" ]; then
echo "Shell already set to zsh"
else
sudo chsh -s /bin/zsh $USER sudo chsh -s /bin/zsh $USER
echo -e "\nLog out and back in for changes to take effect."
fi

24
setup
View file

@ -2,6 +2,26 @@
set -e set -e
echo "Choose your adventure:
============================
1. Shell/CLI stuff only
2. Above plus basic GUI
3. Above plus extras like steam, messengers (bloat)
"
read -p "Enter number[1-3]: " input
if ! [ "$input" -eq "$input" ] 2> /dev/null; then
echo "Error: Not a number"
exit 1
elif [ $input -lt 1 ] || [ $input -gt 3 ]; then
echo "Error: Input out of range"
exit 1
fi
# Trigger sudo prompt before less can block password input # Trigger sudo prompt before less can block password input
sudo echo '' sudo echo ''
@ -47,7 +67,7 @@ if [[ $OS == *Arch* ]]; then
git clone https://github.com/adoyle0/Doors.git .doors git clone https://github.com/adoyle0/Doors.git .doors
fi fi
$HOME/.doors/scripts/install_arch $HOME/projects/Doors/scripts/install_arch $input
# These are broken for now # These are broken for now
# elif [[ $OS == *buntu* ]]; then # elif [[ $OS == *buntu* ]]; then
@ -73,7 +93,7 @@ git submodule init && git submodule update
# Copy and link files # Copy and link files
cd $HOME/.doors && cd $HOME/.doors &&
$HOME/.doors/scripts/copy_and_link $HOME/.doors/scripts/copy_and_link $input
# Copy default wallpaper # Copy default wallpaper
if ! test -d $HOME/Pictures; then if ! test -d $HOME/Pictures; then