Skip to content

Instantly share code, notes, and snippets.

@steverobbins
Last active July 1, 2017 02:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steverobbins/bc347b258d815b7ba3b2 to your computer and use it in GitHub Desktop.
Save steverobbins/bc347b258d815b7ba3b2 to your computer and use it in GitHub Desktop.
#!/bin/bash
bash_prompt() {
local NONE="\[\033[0m\]" # unsets color to term's fg color
# regular colors
local K="\[\033[0;30m\]" # black
local R="\[\033[0;31m\]" # red
local G="\[\033[0;32m\]" # green
local Y="\[\033[0;33m\]" # yellow
local B="\[\033[0;34m\]" # blue
local M="\[\033[0;35m\]" # magenta
local C="\[\033[0;36m\]" # cyan
local W="\[\033[0;37m\]" # white
local UC=$W # user's color
[ $UID -eq "0" ] && UC=$R # root's color
PS1="\n${W}┌──────────────────────────────────── ಠ_ಠ ─────────────────────────────────────┐"
USERHOST="$USER@$HOSTNAME"
CNT=$(echo $USERHOST | wc -m)
CNT=`expr 66 - $CNT`
SPACES=$(printf "%${CNT}s" | tr ' ' ' ')
PS1="$PS1\n${W}├─ $C$USER@$HOSTNAME$NONE $SPACES $Y\t "
PS1="$PS1\n${W}├─ $G\w$NONE"
PS1="$PS1\n${W}└─ $NONE\\$ "
}
bash_prompt
unset bash_prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment