Skip to content

Commit

Permalink
Installation work... wip
Browse files Browse the repository at this point in the history
raptor235 committed Jun 19, 2024
1 parent 67fcee5 commit c9d0d14
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions util/set_theme_and_plugins.sh
Original file line number Diff line number Diff line change
@@ -27,14 +27,15 @@ set_oh_my_zsh_theme_and_plugins() {
esac

# Set the theme in .zshrc
if grep -q "^ZSH_THEME=" ~/.zshrc; then
sed -i.bak "s/^ZSH_THEME=.*/ZSH_THEME=\"$ZSH_THEME\"/" ~/.zshrc
else
echo "ZSH_THEME=\"$ZSH_THEME\"" >> ~/.zshrc
fi
if grep -q "^ZSH_THEME=" ~/.zshrc; then
sed -i.bak "s/^ZSH_THEME=.*/ZSH_THEME=\"$ZSH_THEME\"/" ~/.zshrc
else
echo "ZSH_THEME=\"$ZSH_THEME\"" >>~/.zshrc
fi

# Add plugins to .zshrc before sourcing oh-my-zsh
sed -i.bak '/^source $ZSH\/oh-my-zsh.sh/i plugins=(git zsh-autosuggestions zsh-syntax-highlighting)' ~/.zshrc
echo "plugins=(git zsh-autosuggestions zsh-syntax-highlighting)" >>~/.zshrc

echo "Theme set to $theme and plugins configured."

cat ~/.zshrc
}

0 comments on commit c9d0d14

Please sign in to comment.