I want my shell prompt to look like a cheeseburger! πŸ”πŸ”πŸ”

It would be nice if it also displayed: username, hostname, and current directory.

  • 13
    What font can display these Unicodes? – s3lph May 17 '15 at 21:30
  • 7
    @the_Seppi, Symbola is one suitable font, which on Ubuntu is part of the ttf-ancient-fonts package. – cjm May 18 '15 at 3:48
  • 38
    The Unicode character you used is the one for hamburger, not cheeseburger. We must petition the Unicode committee to include more fast food-related glyphs. Where are nuggets? Why is there no "with bacon" combining glyph? How on Earth can a Double Whopper and a Big Mac be conflated to the same code point, despite the enormous difference in significance? It's outrageous. – Federico Poloni May 19 '15 at 17:33
  • 7
    Can you add a screenshot? I only see πŸ”πŸ”πŸ”, which isn't any fun! ;-) – SPRBRN May 20 '15 at 7:17
  • 54
    The source code for πŸ” is πŸžπŸ„πŸ…πŸž – Digital Trauma May 21 '15 at 4:56

great choice!

$ sudo apt-get install ttf-ancient-fonts
$ export PS1="\\u@\h \\w πŸ” "

enjoy.

Putting a cheeseburger on the prompt:

  1. Install a unicode font that contains this character:

    sudo apt-get install ttf-ancient-fonts
    
  2. Try the prompt:

    export PS1="\\u@\h \\w πŸ”  "
    
  3. Make permanent the change (if you don't do that, it will reset once terminal is closed):

    • Run nano .bashrc
    • Go to the 59th line approx. (You can view the current line number pressing Ctrl+C)
    • Locate these lines:

      if [ "$color_prompt" = yes ]; then
          PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
      else
          PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
      fi
      
    • Replace \$ character a the end of the lines beginning with PS1= by the cheeseburger:

      if [ "$color_prompt" = yes ]; then
          PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] πŸ” '
      else
          PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\ πŸ” '
      fi
      

Typing a cheeseburger everywhere (linux only):

  1. Press Ctrl+Shift+U
  2. A underlined lowercase u will appear.
  3. Type 1f354
  4. Press Return
  5. A nice cheeseburger will appear.
  • It doesn't show for me πŸ” – Find Me In The Woods May 19 '15 at 22:19
  • All I get is square – Find Me In The Woods May 19 '15 at 22:19
  • 1
    @FindMeInTheWoods, did you install ttf-ancient-fonts? – Helio May 20 '15 at 7:47
  • 2
    Ctrl-shift-u does not appear to work in xterm or emacs. – Mutant Bob May 20 '15 at 18:53
  • 10
    Ctrl-shift-u is not linux only, it's GTK only (should work in Windows GIMP, for example, too). Won't work neither in xterm nor emacs nor any Qt-based application including the whole of KDE. Also, there's no need to press Return, just release Ctrl and Shift, and the char will be entered. – Ruslan May 21 '15 at 7:15

I couldn't help but take this probably a step too far. This version updates your prompt to display a different character based on time of day, to illustrate what you should be doing at that time.

declare -A pp
pp=(["09"]="🍩🍡" ["07"]="πŸŒ…" ["08"]="πŸŒ…" [10]="πŸ’»" [11]="πŸ’»" [12]="πŸ”πŸŸ" [13]="πŸ”πŸŸ" [14]="πŸ’»" [15]="πŸ’»" [16]="πŸ’»" [17]="πŸš—" [18]="πŸš—" [19]="🍷🍸" [20]="🍷🍸" [24]="πŸŒ™")
u_pp() {
  c=${pp[`date +"%H"`]}
  if [[ $c == "" ]]; then
    c=${pp[24]}
  fi
  PS1='\u@\h:\w${c} '
};
u_pp
export PROMPT_COMMAND="u_pp;"

Probably there's a more concise way to do it; my bash isn't all that great.

To add the current time of day on the left side, replace the assignment of PS1:

PS1='[\@] \u@\h:\w${c} '
  • I know this is the most stupid question to be asked in the askubuntu, but I'm just wondering do you have an idea on get this working with mac, coz I'm getting no matches found: [9]= 🍩🍡 when I add this in to my (mac) ~/.bash_profile :) – sameera207 May 25 '15 at 23:16
  • Oh crap, that's a string-vs-integer bug that I found and fixed on my machine, but forgot to update text. Basically, change single-digit keys like [9] and [7] to ["08"] etc. See updated answer. My bad, sorry. – Dan Morrill May 26 '15 at 5:17

If you can't install the 'ancient fonts' maybe a sideways ASCII art cheeseburger would work?

export PS1="\\u@\h \\w (||]"

Of course, there could be different ways of typing this, possibly including lettuce, pickles, etc.

You can use the following code to create a useful and colorful prompt with an ASCII art hamburger. Well... to be correct, this is a cheeseburger, red meat, with salad on white Italian bread! Special delight! ;-)

Login as the user, go to the home folder and open the bashrc file:

vim ~/.bashrc 

Add or replace the following line:

export PS1="\[\e[01;37m\][\[\e[0m\]\[\e[01;32m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[01;34m\]\h\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;37m\]\t\[\e[0m\]\[\e[01;37m\] \W \e[1;37m(\e[1;32m|\e[1;33m|\e[1;31m|\e[1;37m]\\$ \[\e[0m\]"

Result (no colors):

[john@server003 15:39:14 ~ (|||]$

Green Cheeseburger:

export PS1='\[\e[1;32m\][\u@\h \W]\πŸ” \[\e[0m\] '

Red Cheesburger:

export PS1='\[\e[1;31m\][\u@\h \W]\πŸ” \[\e[0m\] '

Bicycle:

export PS1="\\u@\h \\w 🚴 "

or

export PS1="\\u@\h \\w 🚡 "

Love hearts:

export PS1="\\u@\h \\w πŸ’ž πŸ’– πŸ’“ πŸ’• πŸ’˜ "

Show the time on the left and a watch on the right:

export PS1="[\@] \u@\h πŸ•’ "

Aside from pasting the emoji into the prompt definition directly, you can use the Unicode code point for cheeseburger with printf and command substitution within the prompt:

$ PS1='$(printf "\U0001f354") $ '
πŸ” $ echo "Hello,my cheesy prompt!"
Hello,my cheesy prompt!
πŸ” $

protected by Community May 23 '15 at 10:39

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.