mirror of https://gitlab.com/ceda_ei/wish
Replace all evals with declare
This commit is contained in:
parent
bbe08b8244
commit
315fe0bab7
|
@ -6,8 +6,8 @@ local fg_gradient=(16 16 16 16 16 15 15)
|
|||
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
|
||||
|
|
|
@ -8,8 +8,8 @@ function wish_icy_candy_theme {
|
|||
local j=0
|
||||
for i in "${WISH_PLUGINS[@]}"; do
|
||||
[[ $i =~ newline$ ]] && j=0 && continue
|
||||
eval "WISH_${i^^}_FG=${fg_gradient[$j]}"
|
||||
eval "WISH_${i^^}_BG=${l_gradient[$j]}"
|
||||
declare "WISH_${i^^}_FG=${fg_gradient[$j]}"
|
||||
declare "WISH_${i^^}_BG=${l_gradient[$j]}"
|
||||
((j++))
|
||||
if [[ $j -eq ${#l_gradient[@]} ]]; then
|
||||
j=0
|
||||
|
@ -20,8 +20,8 @@ function wish_icy_candy_theme {
|
|||
for ((idx=$((${#WISH_RIGHT_PLUGINS[@]} - 1)); idx >= 0; idx--)); do
|
||||
i=${WISH_RIGHT_PLUGINS[$idx]}
|
||||
[[ $i =~ newline$ ]] && j=0 && continue
|
||||
eval "WISH_${i^^}_BG=${r_gradient[$j]}"
|
||||
eval "WISH_${i^^}_FG=${fg_gradient[$j]}"
|
||||
declare "WISH_${i^^}_BG=${r_gradient[$j]}"
|
||||
declare "WISH_${i^^}_FG=${fg_gradient[$j]}"
|
||||
((j++))
|
||||
if [[ $j -eq ${#r_gradient[@]} ]]; then
|
||||
j=0
|
||||
|
|
|
@ -6,8 +6,8 @@ local gradient=(e7c547 c0e551 82e35a 62e177 6bdfb3 73d4dd 7aa6da)
|
|||
local j=0
|
||||
for i in ${WISH_PLUGINS[@]}; do
|
||||
[[ $i =~ newline$ ]] && j=0 && continue
|
||||
eval WISH_${i^^}_BG=-1
|
||||
eval WISH_${i^^}_FG=${gradient[$j]}
|
||||
declare WISH_${i^^}_BG=-1
|
||||
declare WISH_${i^^}_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=-1
|
||||
eval WISH_${i^^}_FG=${gradient[$j]}
|
||||
declare WISH_${i^^}_BG=-1
|
||||
declare WISH_${i^^}_FG=${gradient[$j]}
|
||||
((j++))
|
||||
if [[ $j -eq ${#gradient[@]} ]]; then
|
||||
j=0
|
||||
|
|
|
@ -7,8 +7,8 @@ function wish_luminous_theme {
|
|||
local j=0
|
||||
for i in "${WISH_PLUGINS[@]}"; do
|
||||
[[ $i =~ newline$ ]] && j=0 && continue
|
||||
eval "WISH_${i^^}_FG=${fg_gradient[$j]}"
|
||||
eval "WISH_${i^^}_BG=${gradient[$j]}"
|
||||
declare "WISH_${i^^}_FG=${fg_gradient[$j]}"
|
||||
declare "WISH_${i^^}_BG=${gradient[$j]}"
|
||||
((j++))
|
||||
if [[ $j -eq ${#gradient[@]} ]]; then
|
||||
j=0
|
||||
|
@ -19,8 +19,8 @@ function wish_luminous_theme {
|
|||
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
|
||||
|
|
|
@ -2,6 +2,6 @@ WISH_DEFAULT_BG=-1
|
|||
WISH_DEFAULT_FG=-1
|
||||
WISH_POWERLINE=0
|
||||
for i in ${WISH_PLUGINS[@]} ${WISH_RIGHT_PLUGINS[@]}; do
|
||||
eval WISH_${i^^}_BG=-1
|
||||
eval WISH_${i^^}_FG=-1
|
||||
declare WISH_${i^^}_BG=-1
|
||||
declare WISH_${i^^}_FG=-1
|
||||
done
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue