Juni Kim
3 years ago
2 changed files with 112 additions and 0 deletions
-
2.vimrc
-
110user_ubuntu.sh
@ -0,0 +1,2 @@ |
|||||
|
set mouse=a |
||||
|
set number |
@ -0,0 +1,110 @@ |
|||||
|
#!/bin/sh |
||||
|
|
||||
|
DIR="$(realpath "$(dirname "$0")")" |
||||
|
|
||||
|
# script must start at home directory |
||||
|
cd "$HOME" || exit 1; |
||||
|
|
||||
|
usertest() { |
||||
|
if test "$(id -u)" -eq 0; then |
||||
|
echo "You cannot run this script as root."; |
||||
|
exit 1; |
||||
|
fi |
||||
|
|
||||
|
if ! (type sudo 2>&1) > /dev/null; then |
||||
|
echo "sudo is not installed."; |
||||
|
exit 1 |
||||
|
fi |
||||
|
|
||||
|
sudo apt install -y make curl |
||||
|
echo "Updating APT and adding PPA's" |
||||
|
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - |
||||
|
sudo apt -y update || exit 1 |
||||
|
sudo apt -y upgrade || exit 1 |
||||
|
} |
||||
|
|
||||
|
dev() { |
||||
|
echo "Developer tools..." |
||||
|
sudo snap install nvim --classic |
||||
|
sudo apt-get update && sudo apt-get install nodejs |
||||
|
} |
||||
|
|
||||
|
|
||||
|
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; |
||||
|
} |
||||
|
|
||||
|
shell() { |
||||
|
sudo apt install -y zsh |
||||
|
sudo snap install starship |
||||
|
} |
||||
|
|
||||
|
browsers() { |
||||
|
sudo apt remove -y firefox |
||||
|
sudo snap install brave |
||||
|
} |
||||
|
|
||||
|
torbrowser() { |
||||
|
sudo apt install -y torbrowser-launcher |
||||
|
} |
||||
|
|
||||
|
meetings() { |
||||
|
sudo snap install skype zoom-client |
||||
|
sudo curl -LJ https://github.com/junikimm717/mt/releases/download/33627ab/mt -o /usr/local/bin/mt |
||||
|
sudo chmod +x /usr/local/bin/mt |
||||
|
} |
||||
|
|
||||
|
# neovim must be installed. |
||||
|
plugins() { |
||||
|
# install vim-plug, oh-my-zsh, and zsh-syntax-highlighting |
||||
|
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ |
||||
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' |
||||
|
sh -c "$(wget -O- 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() { |
||||
|
echo "Adding vim and zsh configs" |
||||
|
if ! test -d "$DIR/dotfiles"; then |
||||
|
echo "$DIR/dotfiles folder not found."; |
||||
|
exit 1; |
||||
|
fi |
||||
|
mkdir -p "$HOME/.config/nvim" |
||||
|
cp "$DIR/dotfiles/.zshrc" "$HOME/.zshrc" |
||||
|
cp "$DIR/dotfiles/init.vim" "$HOME/.config/nvim/init.vim" |
||||
|
nvim --headless +PlugInstall +qa |
||||
|
} |
||||
|
|
||||
|
competitiveprogramming() { |
||||
|
echo "CP Compilers..." |
||||
|
sudo dnf install clang clang-tools-extra |
||||
|
cd "$HOME" || exit 1; |
||||
|
git clone https://git.junickim.me/junikimm717/linuxcp "$HOME/cp" |
||||
|
} |
||||
|
|
||||
|
(usertest && dev && sysinfo && shell && browsers && torbrowser && meetings && plugins && dotfiles) || exit 1 |
||||
|
|
||||
|
cat <<EOF |
||||
|
Stuff to do: |
||||
|
|
||||
|
- Install the coc extensions |
||||
|
- Settle brave key stuff |
||||
|
- Copy over the mt config files |
||||
|
EOF |
Write
Preview
Loading…
Cancel
Save
Reference in new issue