dotfiles/setup.sh
Nikurasu 1e6359fc0d
feat(Shell): Add scripts
Add FFMPEG and git commit script
2023-11-27 09:32:22 +01:00

93 lines
3.4 KiB
Bash
Executable file

#!/usr/bin/env bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
echo '
-------------------------------------------------------------
_ _ _ _ ____ _ _____ _ _
| \ | (_) | ___ _ ___| _ \ ___ | |_| ___(_) | ___ ___
| \| | | |/ / | | / __| | | |/ _ \| __| |_ | | |/ _ \/ __|
| |\ | | <| |_| \__ \ |_| | (_) | |_| _| | | | __/\__ \
|_| \_|_|_|\_\\__,_|___/____/ \___/ \__|_| |_|_|\___||___/
Dirty Setup Script for this glorious Dotfiles
-------------------------------------------------------------'
if type -p apt > /dev/null
then
echo 'Debian/Ubuntu'
PKG_MNGR="apt"
elif type -p dnf > /dev/null
then
echo 'RHEL/Fedora'
PKG_MNGR="dnf"
fi
echo '
-------------------------------------------------------------
Install hard dependencies golang, jq
-------------------------------------------------------------'
if [ "$PKG_MNGR" = "apt" ]
then
sudo apt-get update > /dev/null && sudo apt-get install golang jq
elif [ "$PKG_MNGR" = "dnf" ]
then
sudo dnf install golang jq
else
echo "No Package Manager configured, couldn't install"
fi
if ! type -p go > /dev/null
then
echo '-------------------------------------------------------------'
echo "Couldn't install go qwq... Aborting the script"
echo '-------------------------------------------------------------'
exit 1
fi
echo '
-------------------------------------------------------------
Install Gum for a pretty CLI Experience
-------------------------------------------------------------'
go install github.com/charmbracelet/gum@latest > /dev/null
if ! type -p gum > /dev/null
then
echo '-------------------------------------------------------------'
echo "Couldn't install gum qwq... Aborting the script"
echo '-------------------------------------------------------------'
exit 1
fi
gum style --border rounded --margin '1 2' --padding '2 4' --align center --foreground '#5BCEFA' --border-foreground '#F5A9B8' 'Gum is now installed' 'yay :3'
echo "Niku perfers to use the fish shell, but the design of the dotfiles (starship) works with nearly any shell, do you want to switch to fish"
WANTS_FISH=$(gum choose "Yes" "No")
if [ "$WANTS_FISH" = "Yes" ]
then
if [ "$PKG_MNGR" = "apt" ]
then
sudo apt-get update > /dev/null && sudo apt-get install fish
elif [ "$PKG_MNGR" = "dnf" ]
then
sudo dnf install fish
else
echo "No Package Manager configured, couldn't install"
fi
fi
gum style --border rounded --margin '1 1' --padding '1 1' --align center --foreground '#5BCEFA' --border-foreground '#F5A9B8' 'Do you want to install nikus fish config'
WANTS_SHELL_THEME=$(gum choose "Yes" "No")
if [ "$WANTS_SHELL_THEME" = "Yes" ]
then
ln -s "$SCRIPT_DIR/fish" $HOME/.config/
fi
gum style --border rounded --margin '1 1' --padding '1 1' --align center --foreground '#5BCEFA' --border-foreground '#F5A9B8' 'Do you want to install nikus shell theme' 'If you havnt installed nikus fish config you need to reference starship in your shell, by yourself'
WANTS_SHELL_STARSHIP=$(gum choose "Yes" "No")
if [ "$WANTS_SHELL_STARSHIP" = "Yes" ]
then
ln -s "$SCRIPT_DIR/starship/config.toml" $HOME/.config/starship.toml
fi
gum style --border rounded --margin '1 1' --padding '1 1' --align center --foreground '#5BCEFA' --border-foreground '#F5A9B8' 'Do you want to patch your vscodium config to use microsofts marketplace instead of open-vsx'
WANTS_SHELL_MS_MARKET=$(gum choose "Yes" "No")
if [ "$WANTS_SHELL_MS_MARKET" = "Yes" ]
then
bash ./patch-codium.sh
fi