-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
44 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
#!/bin/bash | ||
|
||
set_oh_my_zsh_theme_and_plugins() { | ||
echo "Select a theme for Oh My Zsh or type your custom theme:" | ||
echo "1) robbyrussell" | ||
echo "2) agnoster" | ||
echo "3) gallois" | ||
echo "4) avit" | ||
echo "5) random" | ||
echo "6) Custom theme" | ||
echo -n "Enter the number corresponding to your choice or type your theme name: " | ||
read theme_choice | ||
# Create .zshrc if it doesn't exist | ||
if [ ! -f ~/.zshrc ]; then | ||
touch ~/.zshrc | ||
fi | ||
|
||
case $theme_choice in | ||
1) | ||
theme="robbyrussell" | ||
;; | ||
2) | ||
theme="agnoster" | ||
;; | ||
3) | ||
theme="gallois" | ||
;; | ||
4) | ||
theme="avit" | ||
;; | ||
5) | ||
theme="random" | ||
;; | ||
6) | ||
echo -n "Enter your custom theme name: " | ||
read custom_theme | ||
theme="$custom_theme" | ||
;; | ||
*) | ||
echo "Invalid choice, defaulting to robbyrussell" | ||
theme="robbyrussell" | ||
;; | ||
esac | ||
echo "Select a theme for Oh My Zsh or type your custom theme:" | ||
echo "1) robbyrussell" | ||
echo "2) agnoster" | ||
echo "3) gallois" | ||
echo "4) avit" | ||
echo "5) random" | ||
echo "6) Custom theme" | ||
echo -n "Enter the number corresponding to your choice or type your theme name: " | ||
read theme_choice | ||
|
||
# Create .zshrc if it doesn't exist | ||
if [ ! -f ~/.zshrc ]; then | ||
touch ~/.zshrc | ||
fi | ||
case $theme_choice in | ||
1) | ||
theme="robbyrussell" | ||
;; | ||
2) | ||
theme="agnoster" | ||
;; | ||
3) | ||
theme="gallois" | ||
;; | ||
4) | ||
theme="avit" | ||
;; | ||
5) | ||
theme="random" | ||
;; | ||
6) | ||
echo -n "Enter your custom theme name: " | ||
read custom_theme | ||
theme="$custom_theme" | ||
;; | ||
*) | ||
echo "Invalid choice, defaulting to robbyrussell" | ||
theme="robbyrussell" | ||
;; | ||
esac | ||
|
||
# Set the theme in .zshrc | ||
sed -i.bak "s/^ZSH_THEME=.*/ZSH_THEME=\"$theme\"/" ~/.zshrc | ||
# Set the theme in .zshrc | ||
sed -i.bak "s/^ZSH_THEME=.*/ZSH_THEME=\"$theme\"/" ~/.zshrc | ||
|
||
# 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 | ||
# 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 "Theme set to $theme and plugins configured." | ||
echo "Theme set to $theme and plugins configured." | ||
} |