Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My config in ~/.oh-my-zsh/themes/agnoster.zsh-theme to random emoji. #116

Closed
emunozhern opened this issue Aug 26, 2019 · 2 comments
Closed

Comments

@emunozhern
Copy link

My config in ~/.oh-my-zsh/themes/agnoster.zsh-theme to random emoji.

prompt_context() {
  # Custom (Random emoji)
  emojis=("⚡️" "🔥" "💀" "👑" "😎" "🐸" "🐵" "🦄" "🌈" "🍻" "🚀" "💡" "🎉" "🔑" "🇹🇭" "🚦" "🌙")
  RAND_EMOJI_N=$(( $RANDOM % ${#emojis[@]} + 1))
  prompt_segment black default "${emojis[$RAND_EMOJI_N]} "
}

image

Originally posted by @biigpongsatorn in #39 (comment)

@apjanke
Copy link
Collaborator

apjanke commented Jan 4, 2020

You can use "local n" instead of $RAND_EMOJI_N if you want to avoid clobbering variables set by the user or other code.

@apjanke
Copy link
Collaborator

apjanke commented Jan 4, 2020

FYI, I added this to my AgnosterJ fork: apjanke/agnosterj-zsh-theme@adb1be2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants