Skip to content

Instantly share code, notes, and snippets.

@getsueineko
Last active December 12, 2021 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save getsueineko/dd156a0db9314a5e71dfb3d21d48b57e to your computer and use it in GitHub Desktop.
Save getsueineko/dd156a0db9314a5e71dfb3d21d48b57e to your computer and use it in GitHub Desktop.
#!/usr/bin/env zsh
# Quick config my zsh
# set -Eeuo pipefail
# Fix for Linux TTY
if [[ "$OSTYPE" == "linux"* ]]; then
sed -i 's/ZSH_THEME="robbyrussell"/if [ "$TERM" = "linux" ]; then\n\ ZSH_THEME="clean"\nelse\n\ ZSH_THEME="robbyrussell"\nfi/' ~/.zshrc
echo -e "\nif [ \"\$TERM\" = \"linux\" ]; then\n ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=3'\nelse\n ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=245'\nfi\n" >> ~/.zshrc
fi
# Install plugins
git clone https://github.com/zsh-users/zsh-autosuggestions.git $(pwd)/.oh-my-zsh/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $(pwd)/.oh-my-zsh/plugins/zsh-syntax-highlighting
# Enable plugins and aliases
sed -i 's/plugins=(git)/plugins=(git sudo zsh-interactive-cd zsh-syntax-highlighting zsh-autosuggestions)/' ~/.zshrc
echo 'eval $(thefuck --alias)' >> ~/.zshrc
echo -e "\nalias wttr='wget -O - wttr.in/Brisbane -q'" >> ~/.zshrc
source ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment