1 # The Official Theme of Major League Hacking
11 # # # # # # # # # # # # # # # # # #
12 # # # Feel free to customize! # # #
13 # # # # # # # # # # # # # # # # # #
15 # To customize symbols (e.g MLH_AT_SYMBOL), simply set them as environment variables
16 # for example in your ~/.zshrc file, like this:
17 # MLH_AT_SYMBOL=" at "
19 # Settings *must* be set before sourcing oh-my-zsh.sh the .zshrc file.
21 # To easily discover colors and their codes, type `spectrum_ls` in the terminal
23 # right prompt default settings
24 if [ -z "$MLH_PRINT_EXIT_CODE" ]; then
25 MLH_PRINT_EXIT_CODE=true
28 if [ -z "$MLH_PRINT_TIME" ]; then
32 # left prompt symbols default settings
34 if [ -z "$MLH_AT_SYMBOL" ]; then
38 if [ -z "$MLH_IN_SYMBOL" ]; then
42 if [ -z "$MLH_ON_SYMBOL" ]; then
46 if [ -z "$MLH_SHELL_SYMBOL" ]; then
52 DEVICE_COLOR="%F{033}"
54 BRANCH_COLOR="%F{001}"
58 echo "$USER_COLOR%n%f"
63 echo "$DEVICE_COLOR%m%f"
66 # Prints the current directory
68 echo "$DIR_COLOR%1~%f"
73 if [ "$MLH_PRINT_TIME" = true ]; then
74 echo " $TIME_COLOR%*%f"
78 # Prints exit code of the last executed command
80 if [ "$MLH_PRINT_EXIT_CODE" = true ]; then
81 echo "%(?..%F{001}exit %?)%f"
86 printf "\n$MLH_SHELL_SYMBOL"
89 # Set git_prompt_info text
90 ZSH_THEME_GIT_PROMPT_PREFIX="${MLH_ON_SYMBOL}${BRANCH_COLOR}"
91 ZSH_THEME_GIT_PROMPT_SUFFIX="%f"
92 ZSH_THEME_GIT_PROMPT_DIRTY=""
93 ZSH_THEME_GIT_PROMPT_CLEAN=""
95 # %B and %b make the text bold
96 PROMPT='%b$(username)$MLH_AT_SYMBOL$(device)$MLH_IN_SYMBOL$(directory)$(git_prompt_info)%b$(prompt_end)'
97 RPROMPT="$(exit_code)$(current_time)"