Skip to content

Commit

Permalink
fix(themes): fixing the themes emoji by adding a variable that can be…
Browse files Browse the repository at this point in the history
… overwritten to allow greater permissiveness when customizing
  • Loading branch information
bgcicca committed Jan 22, 2025
1 parent 548da10 commit 3e28c68
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
4 changes: 3 additions & 1 deletion themes/nekonight/nekonight-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ function _omb_theme_nekonight_git_prompt_info() {
branch_name=$(git symbolic-ref --short HEAD 2>&-)
local git_status=""

local icon_emoji="${_omb_theme_nekonight_icon_emoji:-🐱}"

if [[ -n $branch_name ]]; then
git_status="${_omb_prompt_bold_white}(🐱 $branch_name $(_omb_theme_nekonight_scm_git_status))${_omb_prompt_normal}"
git_status="${_omb_prompt_bold_white} (${icon_emoji} $branch_name $(_omb_theme_nekonight_scm_git_status))${_omb_prompt_normal}"
fi

echo -n "$git_status"
Expand Down
7 changes: 2 additions & 5 deletions themes/nekonight/nekonight.theme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
# ╭─🐱 virtualenv 🐱user at 🐱host in 🐱directory on (🐱branch {1} ↑1 ↓1 +1 •1 ⌀1 ✗)
# ╰λ cd ~/path/to/your-directory

if [ -z "${NEKONIGHT_BASE_LOADED}" ]; then
source "$OSH/themes/nekonight/nekonight-base.sh"
export NEKONIGHT_BASE_LOADED=true
fi
source "$OSH/themes/nekonight/nekonight-base.sh"

_omb_theme_nekonight_icon_emoji="🐱"
icon_start="╭─"
icon_user=" 🐱 ${_omb_prompt_bold_olive}\u${_omb_prompt_normal}"
icon_host=" at 🐱 ${_omb_prompt_bold_cyan}\h${_omb_prompt_normal}"
Expand All @@ -23,4 +21,3 @@ function _omb_theme_PROMPT_COMMAND() {
PS1="${icon_start}${icon_user}${icon_host}${icon_directory} in $(_omb_theme_nekonight_git_prompt_info)\n${icon_end} "
}
_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND

8 changes: 2 additions & 6 deletions themes/nekonight_moon/nekonight_moon.theme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
# ╭─🌙 virtualenv 🌙user at 🌙host in 🌙directory on (🌙branch {1} ↑1 ↓1 +1 •1 ⌀1 ✗)
# ╰λ cd ~/path/to/your-directory

if [ -z "${NEKONIGHT_BASE_LOADED}" ]; then
source "$OSH/themes/nekonight/nekonight-base.sh"
export NEKONIGHT_BASE_LOADED=true
fi
source "$OSH/themes/nekonight/nekonight-base.sh"

_omb_theme_nekonight_icon_emoji="🌙"
icon_start="╭─"
icon_user=" 🌙 ${_omb_prompt_bold_olive}\u${_omb_prompt_normal}"
icon_host=" at 🌙 ${_omb_prompt_bold_cyan}\h${_omb_prompt_normal}"
Expand All @@ -24,5 +22,3 @@ function _omb_theme_PROMPT_COMMAND() {
}

_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND


0 comments on commit 3e28c68

Please sign in to comment.