Last active
August 27, 2022 13:57
-
-
Save pplmx/ecb089f681da6842b3abf3f8382b2d0a to your computer and use it in GitHub Desktop.
ubuntu init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# change the apt sources to aliyun | |
cat << EOF > /etc/apt/sources.list | |
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse | |
deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse | |
deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse | |
deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse | |
EOF | |
# update and upgrade | |
sudo apt-get update && \ | |
sudo apt-get upgrade -y | |
# add some ppa sources | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository -y ppa:git-core/ppa | |
sudo add-apt-repository -y ppa:neovim-ppa/stable | |
# install softwares | |
sudo apt-get install -y git neovim zsh | |
chsh -s $(which zsh) $(whoami) | |
sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)" | |
curl -sLf https://spacevim.org/cn/install.sh | bash | |
git clone https://github.com/junegunn/fzf.git ~/.fzf | |
~/.fzf/install | |
git clone https://github.com/zsh-users/zsh-autosuggestions.git \ | |
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \ | |
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
git clone https://github.com/romkatv/powerlevel10k.git \ | |
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k | |
# configure the plugins | |
sed -i 's/^plugins=\(.*\)/plugins=\(git z sudo history zsh-autosuggestions zsh-syntax-highlighting\)/g' ~/.zshrc | |
# configure theme: powerlevel10k | |
sed -i 's@^ZSH_THEME=.*@ZSH_THEME="powerlevel10k/powerlevel10k"@g' ~/.zshrc | |
omz reload | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment