You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
131 lines
3.9 KiB
131 lines
3.9 KiB
#!/bin/sh
|
|
|
|
DIR="$(realpath "$(dirname "$0")")"
|
|
|
|
# script must start at home directory
|
|
cd "$HOME" || exit 1;
|
|
|
|
dependencies() {
|
|
sudo dnf update -y
|
|
sudo dnf install -y make curl sudo git zip unzip || exit 1
|
|
sudo dnf install -y nodejs golang cargo tmux g++ gcc || exit 1
|
|
}
|
|
|
|
sysinfo() {
|
|
echo "Dylan Araps scripts"
|
|
cd "$HOME" || exit 1;
|
|
mkdir -p repos
|
|
git clone https://github.com/dylanaraps/pfetch "$HOME/repos/pfetch"
|
|
git clone https://github.com/dylanaraps/neofetch "$HOME/repos/neofetch"
|
|
git clone https://github.com/dylanaraps/fff "$HOME/repos/fff"
|
|
|
|
cd "$HOME/repos/pfetch" || exit 1;
|
|
sudo make install || exit 2;
|
|
cd "$HOME" || exit 1;
|
|
|
|
cd "$HOME/repos/neofetch" || exit 1;
|
|
sudo make install || exit 2;
|
|
cd "$HOME" || exit 1;
|
|
|
|
cd "$HOME/repos/fff" || exit 1;
|
|
sudo make install || exit 2;
|
|
cd "$HOME" || exit 1;
|
|
}
|
|
|
|
browsers() {
|
|
sudo dnf install -y dnf-plugins-core
|
|
|
|
sudo dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
|
|
|
|
sudo rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
|
|
|
|
sudo dnf install -y brave-browser
|
|
}
|
|
|
|
torbrowser() {
|
|
sudo dnf install -y torbrowser-launcher
|
|
}
|
|
|
|
popshell() {
|
|
sudo dnf install -y gnome-shell-extension-pop-shell
|
|
}
|
|
|
|
dotfiles() {
|
|
echo "Adding zsh and tmux configs"
|
|
# zsh plugins
|
|
sudo dnf install -y zsh
|
|
export RUNZSH=no
|
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
|
|
# dotfiles
|
|
if ! test -d "$DIR/dots"; then
|
|
echo "$DIR/dots folder not found.";
|
|
exit 1;
|
|
fi
|
|
cp "$DIR/dots/zshrc" "$HOME/.zshrc"
|
|
cp "$DIR/dots/tmux.conf" "$HOME/.tmux.conf"
|
|
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm || exit 1
|
|
tmux start \; \
|
|
new -d \; \
|
|
run "$HOME/.tmux/plugins/tpm/scripts/install_plugins.sh" \; \
|
|
kill-session || exit 1
|
|
mkdir -p "$HOME/.local/bin" || exit 1
|
|
cp -r "$DIR/scripts/." "$HOME/.local/bin/" || exit 1
|
|
}
|
|
|
|
neovim() {
|
|
# install neovim
|
|
sudo dnf install -y neovim
|
|
sudo npm install -g tree-sitter-cli
|
|
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim || exit 1
|
|
git clone https://git.junickim.me/junikimm717/nvim2023 ~/.config/nvim || exit 1
|
|
nvim -c PackerSync -c 'sleep 10' -c qa --headless
|
|
echo "sleeping to compile"
|
|
nvim -c 'sleep 40' -c qa --headless
|
|
}
|
|
|
|
neovim_fonts() {
|
|
sudo dnf install -y fonts-jetbrains-mono
|
|
mkdir -p "$HOME/.local/share/fonts/JB"
|
|
cd "$HOME/.local/share/fonts/JB" || exit 1
|
|
curl -LJO https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/JetBrainsMono.zip || exit 1
|
|
unzip JetBrainsMono.zip || exit 1
|
|
fc-cache -rv || exit 1
|
|
sudo dnf install alacritty -y || exit 1
|
|
mkdir -p "$HOME/.config/alacritty" || exit 1
|
|
cp "$DIR/dots/alacritty.yml" "$HOME/.config/alacritty/alacritty.yml" || exit 1
|
|
}
|
|
|
|
competitiveprogramming() {
|
|
echo "CP Compilers..."
|
|
sudo dnf install -y clang clang-tools-extra
|
|
cd "$HOME" || exit 1;
|
|
git clone https://git.junickim.me/junikimm717/linuxcp "$HOME/cp"
|
|
}
|
|
|
|
case "$1" in
|
|
ssh|s)
|
|
(dependencies && sysinfo && dotfiles && neovim) || exit 1
|
|
;;
|
|
graphical|g)
|
|
(dependencies && sysinfo && browsers && dotfiles && neovim && neovim_fonts && popshell) || exit 1
|
|
;;
|
|
full|f)
|
|
(dependencies && sysinfo && browsers && torbrowser && meetings && dotfiles && neovim && neovim_fonts && popshell) || exit 1
|
|
;;
|
|
cp|c)
|
|
(dependencies && sysinfo && browsers && dotfiles && neovim && neovim_fonts && competitiveprogramming && popshell) || exit 1
|
|
;;
|
|
*)
|
|
echo "First Argument should be one of ssh, graphical, full, or cp"
|
|
;;
|
|
esac
|
|
|
|
cat <<EOF
|
|
Stuff to do:
|
|
|
|
- Install pop-shell (make local-install)
|
|
|
|
- Settle brave key stuff
|
|
- Copy over the mt config files
|
|
EOF
|