diff options
Diffstat (limited to 'dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/jobs.zsh')
| m--------- | dot-oh-my-zsh | 0 | ||||
| -rw-r--r-- | dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/jobs.zsh | 41 |
2 files changed, 0 insertions, 41 deletions
diff --git a/dot-oh-my-zsh b/dot-oh-my-zsh new file mode 160000 +Subproject 6fe84bf5c82da7b1f6d7c5ec3e5c447721ac8ce diff --git a/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/jobs.zsh b/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/jobs.zsh deleted file mode 100644 index 6fd013d8..00000000 --- a/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/jobs.zsh +++ /dev/null @@ -1,41 +0,0 @@ -# -# Background jobs -# - -# ------------------------------------------------------------------------------ -# Configuration -# ------------------------------------------------------------------------------ - -SPACESHIP_JOBS_SHOW="${SPACESHIP_JOBS_SHOW=true}" -SPACESHIP_JOBS_PREFIX="${SPACESHIP_JOBS_PREFIX=""}" -SPACESHIP_JOBS_SUFFIX="${SPACESHIP_JOBS_SUFFIX=" "}" -SPACESHIP_JOBS_SYMBOL="${SPACESHIP_JOBS_SYMBOL="✦"}" -SPACESHIP_JOBS_COLOR="${SPACESHIP_JOBS_COLOR="blue"}" -SPACESHIP_JOBS_AMOUNT_PREFIX="${SPACESHIP_JOBS_AMOUNT_PREFIX=""}" -SPACESHIP_JOBS_AMOUNT_SUFFIX="${SPACESHIP_JOBS_AMOUNT_SUFFIX=""}" -SPACESHIP_JOBS_AMOUNT_THRESHOLD="${SPACESHIP_JOBS_AMOUNT_THRESHOLD=1}" - -# ------------------------------------------------------------------------------ -# Section -# ------------------------------------------------------------------------------ - -# Show icon if there's a working jobs in the background -spaceship_jobs() { - [[ $SPACESHIP_JOBS_SHOW == false ]] && return - - local jobs_amount=$( jobs -d | awk '!/pwd/' | wc -l | tr -d " ") - - [[ $jobs_amount -gt 0 ]] || return - - if [[ $jobs_amount -le $SPACESHIP_JOBS_AMOUNT_THRESHOLD ]]; then - jobs_amount='' - SPACESHIP_JOBS_AMOUNT_PREFIX='' - SPACESHIP_JOBS_AMOUNT_SUFFIX='' - fi - - spaceship::section \ - "$SPACESHIP_JOBS_COLOR" \ - "$SPACESHIP_JOBS_PREFIX" \ - "${SPACESHIP_JOBS_SYMBOL}${SPACESHIP_JOBS_AMOUNT_PREFIX}${jobs_amount}${SPACESHIP_JOBS_AMOUNT_SUFFIX}" \ - "$SPACESHIP_JOBS_SUFFIX" -} |
