Small script to get random, stable emoji in your bash prompt.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

This is small bash script that you can use to get emoji in your prompt.

  • A terminal's emoji stays static for an hour.
  • Every terminal gets a different, random emoji every hour.
  • Random emoji are chosen from sets based on time of day.

For example:

# Morning
🍳 08:00:00~ $

# Daytime
🍄 14:00:00~ $

# Lunch
🍣 13:15:00~ $

# Back to daytime
📚 16:00:00~ $

# Afternoon snack
🍫 20:30:00~ $

# Evening drinks
🍺 22:00:00~ $

# Late night
🌃 03:00:00~ $


Drop this file somewhere, like your home dir:

curl '' > ~/

If you import that into your ~/.bashrc, it'll give you a bash function CURRENT_EMOJI that you can incorporate into your prompt. Because the emoji change over time, you can't just set $PS1 env var. You need to define a bash function to set it. For example, in your ~/.bashrc:

. ~/
    PS1="$(CURRENT_EMOJI) \u@\h $ "

Which will give you prompts like:

🍹 heewa@airwa3 $

If you don't want the dark comma-ish suffix, or want to add it yourself, you can get just the emoji with $(CURRENT_EMOJI_RAW) and the suffix with $EMOJI_SUFFIX, used like:

If you're already using a function, you can similarly add it to that. For example, I customized bash-git-prompt to add emoji (and a few other small changes), by following the instructions, and placing the CURRENT_EMOJI fn call inside one of their prompt-portions:


And now my prompt looks like: