# Command Prompt



## TruvisT (Feb 3, 2014)

In regards to:

https://wiki.archlinux.org/index.php/Color_Bash_Prompt

Has anyone set their command prompts to a custom style and any reason why? Feel free to share!


----------



## Aldryic C'boas (Feb 3, 2014)

RESET="\[\\e[1;0m\\]"
BLACK="\[\\e[0;30m\\]"
RED="\[\\e[0;31m\\]"
GREEN="\[\\e[0;32m\\]"
BROWN="\[\\e[0;33m\\]"
BLUE="\[\\e[0;34m\\]"
PURPLE="\[\\e[0;35m\\]"
CYAN="\[\\e[0;36m\\]"
LIGHTGRAY="\[\\e[0;37m\\]"
DARKGRAY="\[\\e[1;30m\\]" 
LIGHTRED="\[\\e[1;31m\\]"  
LIGHTGREEN="\[\\e[1;32m\\]" 
YELLOW="\[\\e[1;33m\\]" 
LIGHTBLUE="\[\\e[1;34m\\]" 
LIGHTPURPLE="\[\\e[1;35m\\]"
LIGHTCYAN="\[\\e[1;36m\\]"
WHITE="\[\\e[1;37m\\]"
export PS1="\n${WHITE}-${BROWN}\t${WHITE}- ${BROWN}\H${WHITE}:${LIGHTGRAY}\w${WHITE} :: ${BROWN}\u ${WHITE}% ${RESET}"

-09:11:00- Wren:~ :: aldryic % _

Brown text changes to red when I su~ up.


----------



## DomainBop (Feb 3, 2014)

Hetzner's servers come with a very colorful command prompt.


----------



## MannDude (Feb 3, 2014)

TruvisT said:


> In regards to:
> 
> https://wiki.archlinux.org/index.php/Color_Bash_Prompt
> 
> Has anyone set their command prompts to a custom style and any reason why? Feel free to share!


No, but now I feel inferior for not having done this.


----------



## texteditor (Feb 3, 2014)

Technically mine is ZSH using a trimmed oh-my-zsh, and the prompt PS1 is just a builtin 'theme called gnzh

urxvt colorscheme:


*foreground:#a0a0a0
*background:#1b1d1e
!molokai inspired colors
!black
*color0: #1b1d1e
*color8: #505354
!red
*color1: #f92672
*color9: #ff5995
!green
*color2: #82b414
*color10: #b6e354
!yellow
*color3: #fd971f
*color11: #feed6c
!blue
*color4: #56c2d6
*color12: #8cedff
!magenta
*color5: #8c54fe
*color13: #9e6ffe
!cyan
*color6: #465457
*color14: #899ca1
!white
*color7: #ccccc6
*color15: #f8f8f2

.Xdefaults


! xft settings {
Xft.autohint:false
Xft.lcdfilter:lcddefault
Xft.hintstyle:hintfull
Xft.hinting:false
Xft.antialias:false
Xft.dpi:96
Xft.rgba:rgb

! ------------ }


! URxvt Fonts {
! xfonts-terminus in Debian/Ubuntu
URxvt.font: xft:Terminusixelsize=9 
URxvt.boldFont: xft:Terminus:boldixelsize=9
! ----------- }

! URxvt Settings {
URxvt.title:rxvt-unicode
URxvt.termName:rxvt-unicode
URxvt.visualBell:false
URxvt.urgentOnBell:true
URxvt.highlightSelection:True
URxvt.geometry:90x36
URxvt.borderLess:false
URxvt.externalBorder:1
URxvt.internalBorder:0


!Perl urxvt url support
!URxvt.perl-ext-common:matcher,selection,-readline,-selection-popup,-option-popup,-option-popup,-tabbed,-searchable-scrollback
!URxvt.cutchars:"()*,<>[]{}|'"
!URxvt.matcher.button:1
!URxvt.urlLauncher:chromium
!URxvt.underlineURLs:true
!URxvt.perl-ext:url-select
!URxvt.keysym.M-uerl:url-select:select_next

URxvt.eightBitInput:true
URxvt.inputMethod:SCIM
URxvt.multichar_encoding:utf-8
URxvt.preeditType:OverTheSpot,Root
URxvt.imLocale:en_US.UTF-8
modifier:meta
!alt, meta, hyper, super, mod1..5

URxvt.buffered:true
URxvt.saveLines:1000
URxvt.scrollstylelain
URxvt.secondaryScroll:true
URxvt.jumpScroll:true
URxvt.skipScroll:false
URxvt.scrollBar:false
URxvt.scrollTtyOutput:false
URxvt.scrollWithBuffer:true
URxvt.scrollTtyKeypress:true
URxvt.mouseWheelScrollPage:false

URxvt.iso14755:false
URxvt.iso14755_52:false
! -------------- }

! URxvt Color Settings {
! URxvt colorschemes saved from other users
#include "/home/texteditor/.config/color_schemes/current_scheme" !trapd00r InTheThaw gutterslob XNuColors Visibone Hund CoCoColors Tango Tangoesque Thayer GetFresh crshd

!Color depth in bits
URxvt.depth:16
URxvt.dynamicColorsn
URxvt.transparent:false

!Cursor settings
URxvt.cursorColor:#888888
URxvt.cursorBlink:true
URxvt.cursorUnderline:false
URxvt.pointerColor:gray
URxvt.pointerColorBackground:black
URxvt.pointerBlank:false
URxvt.pointerBlankDelay:2

LS_COLORS  for 'ls' filetype highlighting copied from here - https://github.com/trapd00r/LS_COLORS/blob/master/LS_COLORS

demo:



edit: hostname is green when its localhost


----------



## TekStorm - James (Feb 3, 2014)

```
export PROMPT_COMMAND='echo -en "\033[m\033[38;5;2m"$(( `sed -n "s/MemFree:[\t ]\+\([0-9]\+\) kB/\1/p" /proc/meminfo`/1024))"\033[38;5;22m/"$((`sed -n "s/MemTotal:[\t ]\+\([0-9]\+\) kB/\1/Ip" /proc/meminfo`/1024 ))MB"\t\033[m\033[38;5;55m$(< /proc/loadavg)\033[m"' \
export PS1='\[\e[m\n\e[1;30m\][$$:$PPID \j:\!\[\e[1;30m\]]\[\e[0;36m\] \T \d \[\e[1;30m\][\[\e[1;34m\]\[email protected]\H\[\e[1;30m\]:\[\e[0;37m\]${SSH_TTY} \[\e[0;32m\]+${SHLVL}\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n($SHLVL:\!)\$ '
```


----------



## k0nsl (Feb 3, 2014)

My shell is coloured by default as I'm using fish (see: http://fishshell.com/)


----------



## BuyCPanel-Kevin (Feb 3, 2014)

Debian comes with some coloring for any user other than root, i've been pretty happy with those, but I might have to try getting newer colors!


----------



## TruvisT (Feb 3, 2014)

Some of you may like this one.

http://bashrcgenerator.com/


----------



## wlanboy (Feb 4, 2014)

I am using byobu as a shell extension.


----------

