From eb7f3a6aa39bb02987f96892b43ff40ba5fe4446 Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Sun, 15 Dec 2019 22:00:37 +0530 Subject: [PATCH] Update rgb_gradient to support right prompt. --- themes/rgb_gradient.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/themes/rgb_gradient.sh b/themes/rgb_gradient.sh index cb54307..e926894 100644 --- a/themes/rgb_gradient.sh +++ b/themes/rgb_gradient.sh @@ -13,3 +13,17 @@ for i in ${WISH_PLUGINS[@]}; do j=0 fi done + +j=0 +for i in ${WISH_RIGHT_PLUGINS[@]}; do + [[ $i == "newline" ]] && j=0 && continue + eval WISH_${i^^}_BG=${gradient[$((${#WISH_RIGHT_PLUGINS[@]} - $j - 1))]} + x=WISH_${i^^}_BG + echo WISH_${i^^}_BG: ${!x} ${#gradient[@]} - ${#WISH_RIGHT_PLUGINS[@]} - $j + eval WISH_${i^^}_FG=${fg_gradient[$((${#WISH_RIGHT_PLUGINS[@]} - $j - 1))]} + echo WISH_${i^^}_FG: $WISH_${i^^}_FG + ((j++)) + if [[ $j -eq ${#gradient[@]} ]]; then + j=0 + fi +done