mlh.zsh-theme 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # The Official Theme of
  2. ## ## ## ## ##
  3. ### ### ## ## ##
  4. #### #### ## ## ##
  5. ## ### ## ## #########
  6. ## ## ## ## ##
  7. ## ## ## ## ##
  8. ## ## ######## ## ##
  9. # # # # # # # # # # # # # # # # # #
  10. # # # Feel free to customize! # # #
  11. # # # # # # # # # # # # # # # # # #
  12. # To easily discover colors and their codes, type `spectrum_ls` in the terminal
  13. AT_SYMBOL=" @ "
  14. IN_SYMBOL=" in "
  15. ON_SYMBOL=" on "
  16. SYMBOL="$"
  17. USER_COLOR="%F{001}"
  18. DEVICE_COLOR="%F{033}"
  19. DIR_COLOR="%F{220}"
  20. BRANCH_COLOR="%F{001}"
  21. TIME_COLOR="%F{033}"
  22. username() {
  23. echo "$USER_COLOR%n%f"
  24. }
  25. # Returns device name
  26. device() {
  27. echo "$DEVICE_COLOR%m%f"
  28. }
  29. # The current directory
  30. directory() {
  31. echo "$DIR_COLOR%1~%f"
  32. }
  33. # Current time with milliseconds
  34. current_time() {
  35. echo "$TIME_COLOR%*%f"
  36. }
  37. # Return status of the last command
  38. return_status() {
  39. echo "%(?..%F{001}out %?)%f"
  40. }
  41. # Set the git_prompt_info text
  42. ZSH_THEME_GIT_PROMPT_PREFIX="${ON_SYMBOL}${BRANCH_COLOR}"
  43. ZSH_THEME_GIT_PROMPT_SUFFIX="%f"
  44. ZSH_THEME_GIT_PROMPT_DIRTY=""
  45. ZSH_THEME_GIT_PROMPT_CLEAN=""
  46. # %B and %b make the text bold
  47. PROMPT='%b$(username)$AT_SYMBOL$(device)$IN_SYMBOL$(directory)$(git_prompt_info)%b $SYMBOL '
  48. RPROMPT="$(return_status) $(current_time)"