ohmyzsh/themes/random.zsh-theme
Willy Weiskopf 1ceb8eabc0 Random theme functionality encapsulated in a theme.
The statements for selecting a random theme in oh-my-zsh.sh and the themes plugin are duplicate. Most people eventually eventually settle on a theme, making those lines in oh-my-zsh.sh superfluous. To address those, it may make sense to put the random theme functionality into a theme of its own (since themes are just zsh-script).
2014-07-16 23:02:42 -06:00

6 lines
175 B
Bash

themes=($ZSH/themes/*zsh-theme)
N=${#themes[@]}
((N=(RANDOM%N)+1))
RANDOM_THEME=${themes[$N]}
source "$RANDOM_THEME"
echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."