Last active
July 23, 2024 12:05
-
-
Save guilhermelinhares/e79ce11b3a37a5595b49de94e17f72c5 to your computer and use it in GitHub Desktop.
Install ZSH+Ohmyzsh
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
# Install ZSH | |
sudo apt install zsh -y | |
chsh -s /bin/zsh | |
zsh | |
# Install Oh-my-zsh! -> https://ohmyz.sh/ | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
# Install Spaceship Prompt | |
# https://github.com/spaceship-prompt/spaceship-prompt | |
mkdir ~/custom_themes | |
ZSH_CUSTOM=~/custom_themes | |
git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1 | |
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "~/.oh-my-zsh/themes/spaceship.zsh-theme" | |
# Change ~/.zshrc -> ZSH_THEME="spaceship" | |
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="spaceship"/g' ~/.zshrc | |
# Install Zsh Autosuggestions | |
# https://github.com/zsh-users/zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
# Install Zsh Syntax Highlighting | |
# https://github.com/zsh-users/zsh-syntax-highlighting | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | |
#Install Zsh Completions | |
#https://github.com/zsh-users/zsh-completions | |
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions | |
# Change plugins | |
sed -i 's/plugin=(git)/plugin=plugins=(git zsh-autosuggestions zsh-syntax-highlighting zsh-completions)/g' ~/.zshrc | |
#Config Spaceship | |
config_space=SPACESHIP_PROMPT_ORDER=( | |
user # Username section | |
dir # Current directory section | |
host # Hostname section | |
git # Git section (git_branch + git_status) | |
hg # Mercurial section (hg_branch + hg_status) | |
exec_time # Execution time | |
line_sep # Line break | |
#vi_mode # Vi-mode indicator | |
jobs # Background jobs indicator | |
exit_code # Exit code section | |
char # Prompt character | |
) | |
echo $config_space >> ~/.zshrc | |
echo 'SPACESHIP_USER_SHOW=always | |
SPACESHIP_PROMPT_ADD_NEWLINE=false | |
SPACESHIP_CHAR_SYMBOL="❯" | |
SPACESHIP_CHAR_SUFFIX=" "' >> ~/.zshrc | |
#Install firaCod | |
sudo apt install fonts-firacode | |
# Font optional (https://github.com/pdf/ubuntu-mono-powerline-ttf) | |
mkdir -p ~/.fonts | |
git clone https://github.com/pdf/ubuntu-mono-powerline-ttf.git ~/.fonts/ubuntu-mono-powerline-ttf | |
fc-cache -vf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment