Last active
February 23, 2021 20:31
-
-
Save ErnHem/50771d00b529711008ec6ebeb47596af to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| echo "####### UPDATING #######" | |
| sudo apt-get update -yq | |
| sudo apt-get upgrade -yq | |
| sudo apt-get autoclean -yq | |
| sudo apt-get autoremove -yq | |
| echo "####### INSTALLING zsh curl wget bat #######" | |
| sudo apt-get install -yq zsh curl wget bat | |
| echo "####### INSTALLING exa #######" | |
| curl -s https://api.github.com/repos/ogham/exa/releases/latest \ | |
| | grep "browser_download_url.*linux.*zip" \ | |
| | cut -d '"' -f 4 \ | |
| | tr -d \" \ | |
| | wget -qi - | |
| find . -type f -regex ".*/exa.*\.zip" -exec unzip -o {} \; | |
| sudo mv exa-linux-x86_64 /usr/local/bin/exa | |
| find . -type f -regex ".*/exa.*\.zip" -exec rm -rf {} \; | |
| echo "####### INSTALLING bat #######" | |
| curl -s https://api.github.com/repos/sharkdp/bat/releases/latest \ | |
| | grep "browser_download_url.*bat_.*amd64\.deb" \ | |
| | cut -d '"' -f 4 \ | |
| | tr -d \" \ | |
| | wget -qi - | |
| sudo dpkg -i *.deb | |
| find . -type f -regex ".*/bat.*\.deb" -exec rm -rf {} \; rm bat_*.deb | |
| echo "####### INSTALLING ohmyzsh #######" | |
| rm -rf $HOME/.oh-my-zsh | |
| sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) --unattended" | |
| rm -rf ~/.oh-my-zsh/custom/themes/powerlevel10k | |
| git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k | |
| rm -rf ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions | |
| git clone git://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions | |
| rm -rf ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting | |
| git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting | |
| sed -i ~/.zshrc \ | |
| -e 's/^export ZSH=.*/export ZSH=\$HOME\/.oh-my-zsh/g' \ | |
| -e 's/^ZSH_THEME=.*/ZSH_THEME=\"powerlevel10k\/powerlevel10k\"/g' \ | |
| -e 's/^plugins=.*/plugins=\(git zsh-autosuggestions zsh-syntax-highlighting\)/g' | |
| echo "####### CREATING ALIASES exa->ls ll bat->cat xdg-open->open #######" | |
| echo 'alias ls="exa -lgh"' >> ~/.zshrc | |
| echo 'alias ll="exa -lagh"' >> ~/.zshrc | |
| echo 'alias cat="bat"' >> ~/.zshrc | |
| echo 'alias open="xdg-open"' >> ~/.zshrc | |
| echo "####### CHSH #######" | |
| zsh=$(which zsh) | |
| chsh -s "$zsh" | |
| zsh -c "source ~/.zshrc" | |
| exec zsh -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment