How can I make my shell prompt look like a cheeseburger?
Solution 1
great choice!
$ sudo apt-get install ttf-ancient-fonts
$ export PS1="\\u@\h \\w 🍔 "
enjoy.
Solution 2
Putting a cheeseburger on the prompt:
Install a unicode font that contains this character:
sudo apt-get install ttf-ancient-fonts
Try the prompt:
export PS1="\\u@\h \\w 🍔 "
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 withPS1=
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
- Run
Typing a cheeseburger everywhere (linux only):
- Press Ctrl+Shift+U
- A underlined lowercase
u
will appear. - Type 1f354
- Press Return
- A nice cheeseburger will appear.
Solution 3
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} '
Solution 4
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.
Solution 5
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 ~ (|||]$
- Create your own format using the bashrcgenerator.
- List of color codes
Related videos on Youtube
Corey Goldberg
"Outside of a dog, a book is a man's best friend. Inside of a dog, it's too dark to read."
Updated on September 18, 2022Comments
-
Corey Goldberg over 1 year
I want my shell prompt to look like a cheeseburger! 🍔🍔🍔
It would be nice if it also displayed: username, hostname, and current directory.
-
Admin almost 9 yearsWhat font can display these Unicodes?
-
Admin almost 9 years@the_Seppi, Symbola is one suitable font, which on Ubuntu is part of the
ttf-ancient-fonts
package. -
Admin almost 9 yearsFor time, user, host, directory AND git branch (!) see unix.stackexchange.com/q/127799/10043
-
Admin almost 9 yearsThe 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.
-
Admin almost 9 yearsCan you add a screenshot? I only see 🍔🍔🍔, which isn't any fun! ;-)
-
Admin almost 9 years@SPRBRN, unicode-table.com can search for character: unicode-table.com/en/search/?q=%F0%9F%8D%94
-
Admin almost 9 yearsIt doesn't look anything like that in the font I have here though.
-
Admin almost 9 years@SPRBRN Use the answer - install taht font package, then the browser will find the glyph too, just like the terminal.
-
Admin almost 9 yearsThe source code for 🍔 is 🍞🐄🍅🍞
-
Admin almost 9 yearsI have to say the question looks much better now that I've installed
ttf-ancient-fonts
-
Admin almost 9 yearspossible duplicate of How can I shorten my command line (bash) prompt?
-
-
Find Me In The Woods almost 9 yearsIt doesn't show for me 🍔
-
Find Me In The Woods almost 9 yearsAll I get is square
-
0x2b3bfa0 almost 9 years@FindMeInTheWoods, did you install ttf-ancient-fonts?
-
Mutant Bob almost 9 yearsCtrl-shift-u does not appear to work in xterm or emacs.
-
Iluvathar almost 9 yearsCtrl-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.
-
0x2b3bfa0 almost 9 years@Ruslan: Sorry, it may be as you're saying. However
xterm
shows a small box when I enter Ctrl+Shift+U and it allows me to put a unicode character, but only in the "printable" range. -
sameera207 almost 9 yearsI 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 withmac
, coz I'm gettingno matches found: [9]= 🍩🍵
when I add this in to my (mac) ~/.bash_profile :)