Skip to content

Commit

Permalink
style(themes/ht): adjust styles
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Aug 9, 2024
1 parent 068abea commit bf8dfcf
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions themes/ht/ht.theme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@ SCM_NONE_CHAR=""

function _omb_theme_ht_exit_color {
case $1 in
0)
echo $_omb_prompt_green
;;
1)
echo $_omb_prompt_red
;;
2)
echo $_omb_prompt_gray
;;
126)
echo $_omb_prompt_cyan
;;
127)
echo $_omb_prompt_magenta
;;
130)
echo $_omb_prompt_black
;;
148)
echo $_omb_prompt_yellow
;;
*)
echo $_omb_prompt_blue
;;
0)
echo "$_omb_prompt_green"
;;
1)
echo "$_omb_prompt_red"
;;
2)
echo "$_omb_prompt_gray"
;;
126)
echo "$_omb_prompt_cyan"
;;
127)
echo "$_omb_prompt_magenta"
;;
130)
echo "$_omb_prompt_black"
;;
148)
echo "$_omb_prompt_yellow"
;;
*)
echo "$_omb_prompt_blue"
;;
esac
}

# Displays the current prompt
function _omb_theme_PROMPT_COMMAND() {
function _omb_theme_PROMPT_COMMAND {
# Capture exit code
# NOTE: DO NOT MOVE
local EXIT_CODE=$?
Expand All @@ -54,28 +54,28 @@ function _omb_theme_PROMPT_COMMAND() {
PS1=""

# Exit code indicator
PS1+="$(exit_color "$EXIT_CODE")${_omb_prompt_reset_color}"
PS1+="$(exit_color "$EXIT_CODE")$_omb_prompt_reset_color"

# Environment info
PS1+=" ${_omb_prompt_red}$(_omb_prompt_get_ruby_env)${_omb_prompt_reset_color}"
PS1+=" ${_omb_prompt_green}$(_omb_prompt_get_python_env)${_omb_prompt_reset_color}"
PS1+=" $_omb_prompt_red$(_omb_prompt_get_ruby_env)$_omb_prompt_reset_color"
PS1+=" $_omb_prompt_green$(_omb_prompt_get_python_env)$_omb_prompt_reset_color"

# User and host
local user_host_prefix=" ${_omb_prompt_reset_color}["
local user_host_suffix="${_omb_prompt_reset_color}]"
local user="${_omb_prompt_blue}\u"
local host="${_omb_prompt_cyan}\H"
local at="${_omb_prompt_reset_color}@"
PS1+="${user_host_prefix}${user}${at}${host}${user_host_suffix}"
local user_host_prefix=" $_omb_prompt_reset_color["
local user_host_suffix="$_omb_prompt_reset_color]"
local user="$_omb_prompt_blue\u"
local host="$_omb_prompt_cyan\H"
local at="$_omb_prompt_reset_color@"
PS1+="$user_host_prefix$user$at$host$user_host_suffix"

# Working directory
PS1+=" in ${_omb_prompt_magenta}\W${_omb_prompt_reset_color}"
PS1+=" in $_omb_prompt_magenta\W$_omb_prompt_reset_color"

# SCM
PS1+=" $(scm_prompt_char_info)"

# End prompt
PS1+="\n${_omb_prompt_green}${_omb_prompt_normal}"
PS1+="\n${_omb_prompt_green}$_omb_prompt_normal"
}

# Runs prompt (this bypasses oh-my-bash $PROMPT setting)
Expand Down

0 comments on commit bf8dfcf

Please sign in to comment.