diff --git a/README.md b/README.md index ba16a31eb99cba90447aaf5b0aad40695c3d8041..9676cb554103c6ef54271ce409e8611e9b4a27dd 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,11 @@ You then need to select this theme in your `~/.zshrc` : ZSH_THEME="oh-my-via/via" ``` +### Customization + +Time format defaults to `%D{%H:%M}`, but can be overwritten by setting the variable +`OHMYVIA_TIME_FORMAT` in your `~/.zshrc`. + License ------- diff --git a/via.zsh-theme b/via.zsh-theme index 9784d357ee8df491c3d660b063d4aba90f280313..14c7ca56b550c8e95ef3110e768ed8f1b4dcebdd 100644 --- a/via.zsh-theme +++ b/via.zsh-theme @@ -1,7 +1,8 @@ # VIA ZSH Theme - Preview: ASAP # Fork from the historical VIA Centrale Réseaux ZSH Theme -local clock="%{$fg_bold[cyan]%}%T%{$reset_color%}" +local time_format=${OHMYVIA_TIME_FORMAT:-"%D{%H:%M}"} +local clock="%{$fg_bold[cyan]%}$time_format%{$reset_color%}" # Check the UID if [[ $UID -ne 0 ]];