Skip to content

Instantly share code, notes, and snippets.

@entrptaher
Forked from GuillaumeDesforges/changetheme.sh
Created September 27, 2022 05:14
Show Gist options
  • Save entrptaher/c45215a793caad31cb55269cb1dab778 to your computer and use it in GitHub Desktop.
Save entrptaher/c45215a793caad31cb55269cb1dab778 to your computer and use it in GitHub Desktop.
Bash one liner to set Zsh theme with oh-my-zsh default setup
# Just change the first THEME variable to whatever theme you want. The line will edit, reload and print you the changed line in the .zshrc file
THEME="agnoster"; sed -i s/^ZSH_THEME=".\+"$/ZSH_THEME=\"$THEME\"/g ~/.zshrc && source ~/.zshrc && echo "Edited line in ~/zshrc :" && cat ~/.zshrc | grep -m 1 ZSH_THEME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment