mirror of https://gitlab.com/ceda_ei/wish
Updated rgb_gradient for better assigning in right prompt
This commit is contained in:
parent
fe18fd52db
commit
b1fe80cef3
|
@ -5,7 +5,7 @@ local gradient=(ffff5f 7ad767 66b097 5e7388 534d61 3a3338 121212)
|
||||||
local fg_gradient=(000000 000000 000000 000000 000000 ffffff ffffff)
|
local fg_gradient=(000000 000000 000000 000000 000000 ffffff ffffff)
|
||||||
local j=0
|
local j=0
|
||||||
for i in ${WISH_PLUGINS[@]}; do
|
for i in ${WISH_PLUGINS[@]}; do
|
||||||
[[ $i == "newline" ]] && j=0 && continue
|
[[ $i =~ newline$ ]] && j=0 && continue
|
||||||
eval WISH_${i^^}_BG=${gradient[$j]}
|
eval WISH_${i^^}_BG=${gradient[$j]}
|
||||||
eval WISH_${i^^}_FG=${fg_gradient[$j]}
|
eval WISH_${i^^}_FG=${fg_gradient[$j]}
|
||||||
((j++))
|
((j++))
|
||||||
|
@ -15,13 +15,11 @@ for i in ${WISH_PLUGINS[@]}; do
|
||||||
done
|
done
|
||||||
|
|
||||||
j=0
|
j=0
|
||||||
for i in ${WISH_RIGHT_PLUGINS[@]}; do
|
for ((idx=$((${#WISH_RIGHT_PLUGINS[@]} - 1)); idx >= 0; idx--)); do
|
||||||
[[ $i == "newline" ]] && j=0 && continue
|
i=${WISH_RIGHT_PLUGINS[$idx]}
|
||||||
eval WISH_${i^^}_BG=${gradient[$((${#WISH_RIGHT_PLUGINS[@]} - $j - 1))]}
|
[[ $i =~ newline$ ]] && j=0 && continue
|
||||||
x=WISH_${i^^}_BG
|
eval WISH_${i^^}_BG=${gradient[$j]}
|
||||||
echo WISH_${i^^}_BG: ${!x} ${#gradient[@]} - ${#WISH_RIGHT_PLUGINS[@]} - $j
|
eval WISH_${i^^}_FG=${fg_gradient[$j]}
|
||||||
eval WISH_${i^^}_FG=${fg_gradient[$((${#WISH_RIGHT_PLUGINS[@]} - $j - 1))]}
|
|
||||||
echo WISH_${i^^}_FG: $WISH_${i^^}_FG
|
|
||||||
((j++))
|
((j++))
|
||||||
if [[ $j -eq ${#gradient[@]} ]]; then
|
if [[ $j -eq ${#gradient[@]} ]]; then
|
||||||
j=0
|
j=0
|
||||||
|
|
Loading…
Reference in New Issue