Emoji Prompt

February 22, 2016

A while ago I added emoji to my bash prompt. At first just statically:

πŸ‘ heewa@airwa3:~ $ 

Then I added some small logic to rotate through a list of random starts & ends, so I’d end up with something like:

πŸš• heewa@airwa3:~  πŸŽ… 
🍰 heewa@airwa3:~  🐎 
πŸŒ† heewa@airwa3:~  🐫 
πŸš€ heewa@airwa3:~  πŸ’€ 
☁️ heewa@airwa3:~  🐹 
πŸ‘ heewa@airwa3:~  🐁 
πŸŒ… heewa@airwa3:~  🐩 

Recently I got annoyed at the emoji in my prompt changing after every command, but I do like variety, and they do help distinguish multiple terminals from each other. After fighting bash and experimenting with various ways of randomizing and grouping emoji, I settled on a scheme that behaves like this:

  • A prompt starts with a single emoji.
  • 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.

So now, in the morning, different terminals looks like:

πŸŒ„ 06:00:00~ $
β˜•οΈ 07:00:00~ $
🍳 08:00:00~ $
πŸ“ 09:00:00~ $

Transitioning to day-themed emoji before & after lunch:

🌹 10:00:00~ $
🌊 11:00:00~ $
πŸ„ 14:00:00~ $
πŸ“š 16:00:00~ $

Around lunch, I see:

πŸ• 12:00:00~ $
πŸ™ 12:30:00~ $
πŸ— 13:00:00~ $
🍣 13:15:00~ $

Back to day emoji, until late afternoon, when I get some snacks:

πŸ‘ 19:00:00~ $
🍦 20:00:00~ $
🍫 20:30:00~ $
🍰 21:00:00~ $

Then some drinks in the evening:

🍺 22:00:00~ $
🍹 22:30:00~ $
🍷 23:00:00~ $
🍸 23:30:00~ $

If I’m up late, I’ll see:

😴 02:00:00~ $
πŸŒƒ 03:00:00~ $
πŸŒ’ 04:00:00~ $
⛺️ 05:00:00~ $

Get the script, with usage instructions here: github.com/heewa/emoji-prompt