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.
149 lines
4.5 KiB
149 lines
4.5 KiB
#!/bin/sh
|
|
|
|
DIR="$(realpath "$(dirname "$0")")"
|
|
|
|
# script must start at home directory
|
|
cd "$HOME" || exit 1;
|
|
|
|
dependencies() {
|
|
if ! (type sudo 2>&1) > /dev/null; then
|
|
echo "sudo is not installed.";
|
|
exit 1
|
|
fi
|
|
|
|
sudo apt-get update -y
|
|
|
|
sudo apt-get install -y make curl sudo git zip unzip || exit 1
|
|
|
|
echo "Updating APT and adding PPA's"
|
|
curl -sL https://deb.nodesource.com/setup_22.x | sudo -E bash -
|
|
sudo apt-get update -y || exit 1
|
|
|
|
sudo apt-get install -y ripgrep nodejs gcc g++ golang fzf npm\
|
|
wget tar default-jdk tree-sitter-cli python3-venv cargo tmux zsh libfuse2 || 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;
|
|
}
|
|
|
|
torbrowser() {
|
|
sudo apt install -y torbrowser-launcher
|
|
}
|
|
|
|
popshell() {
|
|
mkdir -p "$HOME/repos"
|
|
sudo apt install git node-typescript make -y
|
|
git clone https://github.com/pop-os/shell.git "$HOME/repos/shell"
|
|
cd "$HOME/repos/shell" || exit 1
|
|
make depcheck
|
|
make compile
|
|
make install
|
|
make configure
|
|
}
|
|
|
|
meetings() {
|
|
mkdir -p "$HOME/repos"
|
|
|
|
# install skype
|
|
curl https://go.skype.com/skypeforlinux-64.deb -LJo "$HOME/repos/skypeforlinux.deb"
|
|
sudo apt install "$HOME/repos/skypeforlinux.deb" -y
|
|
|
|
# install zoom
|
|
curl https://zoom.us/client/latest/zoom_amd64.deb -LJo "$HOME/repos/zoomus.deb"
|
|
sudo apt install "$HOME/repos/zoomus.deb" -y
|
|
}
|
|
|
|
dotfiles() {
|
|
echo "Adding zsh and tmux configs"
|
|
# zsh plugins
|
|
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
|
|
go install github.com/junikimm717/tmuxs || exit 1
|
|
}
|
|
|
|
neovim() {
|
|
# install neovim
|
|
(
|
|
sudo curl https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -LJo /usr/bin/nvim && sudo chmod +x /usr/bin/nvim
|
|
) || exit 1
|
|
git clone https://github.com/junikimm717/nvim2025 ~/.config/nvim || exit 1
|
|
nvim --headless +Lazy! sync +FullSetup +qa
|
|
}
|
|
|
|
neovim_fonts() {
|
|
mkdir -p "$HOME/.local/share/fonts/UM"
|
|
cd "$HOME/.local/share/fonts/UM" || exit 1
|
|
curl -LJO https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/UbuntuMono.zip || exit 1
|
|
unzip UbuntuMono.zip || exit 1
|
|
fc-cache -rv || exit 1
|
|
sudo add-apt-repository ppa:aslatter/ppa -y
|
|
sudo apt install alacritty -y || exit 1
|
|
mkdir -p "$HOME/.config/alacritty" || exit 1
|
|
cp "$DIR/dots/alacritty_ubuntu.toml" "$HOME/.config/alacritty/alacritty.toml" || exit 1
|
|
cp "$DIR/dots/catppuccin-mocha.toml" "$HOME/.config/alacritty/catppuccin-mocha.toml" || exit 1
|
|
}
|
|
|
|
competitiveprogramming() {
|
|
echo "CP Compilers..."
|
|
sudo apt install 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 && dotfiles && neovim && neovim_fonts && popshell) || exit 1
|
|
;;
|
|
full|f)
|
|
(dependencies && sysinfo && torbrowser && meetings && dotfiles && neovim && neovim_fonts && popshell) || exit 1
|
|
;;
|
|
cp|c)
|
|
(dependencies && sysinfo && 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:
|
|
|
|
- Reboot to make all changes active
|
|
- Copy over the mt config files
|
|
EOF
|