|
|
|
@ -1,13 +1,11 @@ |
|
|
|
#!/bin/bash |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
themes_dir="$HOME/.oh-my-zsh/themes" |
|
|
|
themes_dir="$HOME/.oh-my-zsh/themes" |
|
|
|
file_extension=".zsh-theme" |
|
|
|
file_extension=".zsh-theme" |
|
|
|
|
|
|
|
|
|
|
|
themes_array=($(find "$themes_dir" -type f -name "*$file_extension" -exec basename {} \; | sed -e "s/$file_extension//")) |
|
|
|
themes_array=($(find "$themes_dir" -type f -name "*$file_extension" -exec basename {} \; | sed -e "s/$file_extension//")) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rofi_command="rofi -dmenu -config ~/.config/rofi/config-zsh-theme.rasi" |
|
|
|
rofi_command="rofi -dmenu -config ~/.config/rofi/config-themezsh.rasi" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
menu() { |
|
|
|
menu() { |
|
|
|
for theme in "${themes_array[@]}"; do |
|
|
|
for theme in "${themes_array[@]}"; do |
|
|
|
@ -17,6 +15,12 @@ menu() { |
|
|
|
|
|
|
|
|
|
|
|
main() { |
|
|
|
main() { |
|
|
|
choice=$(menu | ${rofi_command}) |
|
|
|
choice=$(menu | ${rofi_command}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# if nothing selected, script wont change anything |
|
|
|
|
|
|
|
if [ -z "$choice" ]; then |
|
|
|
|
|
|
|
exit 0 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
zsh_path="$HOME/.zshrc" |
|
|
|
zsh_path="$HOME/.zshrc" |
|
|
|
var_name="ZSH_THEME" |
|
|
|
var_name="ZSH_THEME" |
|
|
|
for i in "${themes_array[@]}"; do |
|
|
|
for i in "${themes_array[@]}"; do |
|
|
|
@ -29,7 +33,6 @@ main() { |
|
|
|
break |
|
|
|
break |
|
|
|
fi |
|
|
|
fi |
|
|
|
done |
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
main |
|
|
|
main |