-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bash_prompt
63 lines (49 loc) · 2.12 KB
/
.bash_prompt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#=============
#=============
# Bash prompt
#=============
# Requirements:
#----------------
# - iterm2 + monokai_bmacauley.itermcolors
# - bash-git-prompt + monokai-bmacauley.bgptheme
# - battery (homebrew)
# Standard prompt for non-git directories
#-----------------------------------------
# - clock
# - battery indicator
# - root prompt warning
# - based on Steve Losh zsh prompt
# http://stevelosh.com/blog/2009/03/candy-colored-terminal/
# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
# colours
WHITE=$'\e[37;40m'
PINK=$'\e[35;40m'
GREEN=$'\e[32;40m'
ORANGE=$'\e[33;40m'
BLUE=$'\e[34;40m'
RESET=$'\e[33;0m'
# check if root, display /!!!\ warning in prompt
if [[ ${EUID} == 0 ]] ; then
export PS1="${WHITE}[\D{%k:%M%p}] \$(battery_life)\n${PINK}\u ${WHITE}at ${ORANGE}\h ${WHITE}in ${GREEN}\w
${PINK}/!!!\ # \]"
else
export PS1="${WHITE}[\D{%k:%M%p}] \$(battery_life)\n${PINK}\u ${WHITE}at ${ORANGE}\h ${WHITE}in ${GREEN}\w\n${WHITE}$ \]"
fi
# Git prompt displays standard prompt plus git information
#----------------------------------------------------------
# based on magicmonty/bash-git-prompt
# https://github.com/magicmonty/bash-git-prompt
#
GIT_PROMPT_ONLY_IN_REPO=1 # only activate bash-gitprompt in a git controlled directory
# GIT_PROMPT_FETCH_REMOTE_STATUS=0 # uncomment to avoid fetching remote status
# GIT_PROMPT_SHOW_UPSTREAM=1 # uncomment to show upstream tracking branch
# GIT_PROMPT_SHOW_UNTRACKED_FILES=all # can be no, normal or all; determines counting of untracked files
# GIT_PROMPT_SHOW_CHANGED_FILES_COUNT=0 # uncomment to avoid printing the number of changed files
# GIT_PROMPT_STATUS_COMMAND=gitstatus_pre-1.7.10.sh # uncomment to support Git older than 1.7.10
# GIT_PROMPT_START= \[ # uncomment for custom prompt start sequence
# GIT_PROMPT_END=\] # uncomment for custom prompt end sequence
# as last entry source the gitprompt script
# GIT_PROMPT_THEME=Custom # use custom theme specified in file GIT_PROMPT_THEME_FILE (default ~/.git-prompt-colors.sh)
# GIT_PROMPT_THEME_FILE=~/.git-prompt-colors.sh
GIT_PROMPT_THEME=monokai-bmacauley
source ~/.prompt/bash-git-prompt/gitprompt.sh