Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions theme.bash
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,12 @@ function __powerline_left_segment {
}

function __powerline_last_status_prompt {
local symbols=()
local symbols=()
local stopped_jobs
read -N1 stopped_jobs < <(jobs -sp)
[[ $last_status -ne 0 ]] && symbols+="$(__color ${STATUS_PROMPT_ERROR_COLOR})${STATUS_PROMPT_ERROR}"
[[ $UID -eq 0 ]] && symbols+="$(__color ${STATUS_PROMPT_ROOT_COLOR})${STATUS_PROMPT_ROOT}"
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="$(__color ${STATUS_PROMPT_JOBS_COLOR})${STATUS_PROMPT_JOBS}"
[[ ! -z "$stopped_jobs" ]] && symbols+="$(__color ${STATUS_PROMPT_JOBS_COLOR})${STATUS_PROMPT_JOBS}"

[[ -n "$symbols" ]] && echo "$symbols|${STATUS_PROMPT_COLOR}"
}
Expand Down