mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-12-19 20:12:52 +02:00
Update line decoration variables.
- Each variable was splitted in 3 variables containing the start block, middle block and end block respectively. - Now the wrapAt variable controls programatically the length of the decorations lines, (for loop). - Minimal wrapAt allowed value is 3.
This commit is contained in:
parent
64de96062e
commit
283cedb2d4
@ -23,9 +23,15 @@ function print-decimal-unicode-range() {
|
|||||||
local allChars=""
|
local allChars=""
|
||||||
local allCodes=""
|
local allCodes=""
|
||||||
local wrapAt=5
|
local wrapAt=5
|
||||||
local topLine="${bgColorBorder}╔══════╦══════╦══════╦══════╦══════╗${reset_color}"
|
local topLineStart="${bgColorBorder}╔═══"
|
||||||
local bottomLine="${bgColorBorder}╚══════╩══════╩══════╩══════╩══════╝${reset_color}"
|
local topLineMiddle="═══╦═══"
|
||||||
local line="${bgColorBorder}╠══════╬══════╬══════╬══════╬══════╣${reset_color}"
|
local topLineEnd="═══╗${reset_color}"
|
||||||
|
local bottomLineStart="${bgColorBorder}╚═══"
|
||||||
|
local bottomLineMiddle="═══╩═══"
|
||||||
|
local bottomLineEnd="═══╝${reset_color}"
|
||||||
|
local lineStart="${bgColorBorder}╠═══"
|
||||||
|
local lineMiddle="═══╬═══"
|
||||||
|
local lineEnd="═══╣${reset_color}"
|
||||||
local bar="${bgColorBorder}║${reset_color}"
|
local bar="${bgColorBorder}║${reset_color}"
|
||||||
local originalSequenceLength=${#originalSequence[@]}
|
local originalSequenceLength=${#originalSequence[@]}
|
||||||
local leftoverSpaces=$((wrapAt - (originalSequenceLength % wrapAt)))
|
local leftoverSpaces=$((wrapAt - (originalSequenceLength % wrapAt)))
|
||||||
@ -41,7 +47,11 @@ function print-decimal-unicode-range() {
|
|||||||
|
|
||||||
local sequenceLength=${#originalSequence[@]}
|
local sequenceLength=${#originalSequence[@]}
|
||||||
|
|
||||||
printf "%b\\n" "$topLine"
|
printf "%b" "$topLineStart"
|
||||||
|
for ((c = 2; c <= wrapAt; c++)); do
|
||||||
|
printf "%b" "$topLineMiddle"
|
||||||
|
done
|
||||||
|
printf "%b\\n" "$topLineEnd"
|
||||||
|
|
||||||
for decimalCode in "${originalSequence[@]}"; do
|
for decimalCode in "${originalSequence[@]}"; do
|
||||||
local hexCode
|
local hexCode
|
||||||
@ -76,7 +86,11 @@ function print-decimal-unicode-range() {
|
|||||||
printf "\\n"
|
printf "\\n"
|
||||||
|
|
||||||
if [ "$counter" != "$sequenceLength" ]; then
|
if [ "$counter" != "$sequenceLength" ]; then
|
||||||
printf "%b\\n" "$line"
|
printf "%b" "$lineStart"
|
||||||
|
for ((c = 2; c <= wrapAt; c++)); do
|
||||||
|
printf "%b" "$lineMiddle"
|
||||||
|
done
|
||||||
|
printf "%b\\n" "$lineEnd"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
allCodes=""
|
allCodes=""
|
||||||
@ -85,7 +99,12 @@ function print-decimal-unicode-range() {
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "%b\\n" "$bottomLine"
|
printf "%b" "$bottomLineStart"
|
||||||
|
for ((c = 2; c <= wrapAt; c++)); do
|
||||||
|
printf "%b" "$bottomLineMiddle"
|
||||||
|
done
|
||||||
|
printf "%b\\n" "$bottomLineEnd"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user