1
0
mirror of https://gitlab.com/ceda_ei/wish synced 2025-12-15 22:00:06 +01:00

Replace all evals with declare

This commit is contained in:
2024-11-07 17:18:59 +05:30
parent bbe08b8244
commit 315fe0bab7
6 changed files with 22 additions and 22 deletions

View File

@@ -6,8 +6,8 @@ local fg_gradient=(000000 000000 000000 000000 000000 ffffff ffffff)
local j=0
for i in ${WISH_PLUGINS[@]}; do
[[ $i =~ newline$ ]] && j=0 && continue
eval WISH_${i^^}_BG=${gradient[$j]}
eval WISH_${i^^}_FG=${fg_gradient[$j]}
declare WISH_${i^^}_BG=${gradient[$j]}
declare WISH_${i^^}_FG=${fg_gradient[$j]}
((j++))
if [[ $j -eq ${#gradient[@]} ]]; then
j=0
@@ -18,8 +18,8 @@ j=0
for ((idx=$((${#WISH_RIGHT_PLUGINS[@]} - 1)); idx >= 0; idx--)); do
i=${WISH_RIGHT_PLUGINS[$idx]}
[[ $i =~ newline$ ]] && j=0 && continue
eval WISH_${i^^}_BG=${gradient[$j]}
eval WISH_${i^^}_FG=${fg_gradient[$j]}
declare WISH_${i^^}_BG=${gradient[$j]}
declare WISH_${i^^}_FG=${fg_gradient[$j]}
((j++))
if [[ $j -eq ${#gradient[@]} ]]; then
j=0