diff --git a/brethil.zsh-theme b/brethil.zsh-theme index 01d0219..895544a 100644 --- a/brethil.zsh-theme +++ b/brethil.zsh-theme @@ -5,9 +5,14 @@ # 255: white # See the prompt expansion section in `info zsh` for more info +is_byobu="$(env | grep BYOBU)" local USER_PROMPT="%(#.%K{160}%F{255}[root]%k%f.)" # root printed on a red background # TODO: add lightning here local JOB_PROMPT="%(1j.%B%K{202}%F{220} %j %k%b.)" # Shows jobs number on an orange background if there are background jobs -local SHLVL_PROMPT="%(2L.%K{161}%F{255}%B %L %f%b%k.)" # Shows SHLVL on a magenta background if SHLVL > 1 +if [[ -n "$is_byobu" ]]; then + local SHLVL_PROMPT="%(3L.%K{161}%F{255}%B $((SHLVL-1)) %f%b%k.)" # Shows SHLVL on a magenta background if SHLVL > 1 +else + local SHLVL_PROMPT="%(2L.%K{161}%F{255}%B %L %f%b%k.)" # Shows SHLVL on a magenta background if SHLVL > 1 +fi local PATH_PROMPT="%F{white}[%F{green}%(4~:…/%3~:%~)%F{white}]%f" # Shows last 3 items in path if there are more than 4 # PREFIX/SUFFIX are added before/after `git_prompt_info`