2018-07-09 16:20:40 +02:00
|
|
|
#!/usr/bin/env bash
|
2023-05-13 07:48:24 +02:00
|
|
|
# Nerd Fonts Version: 3.0.1
|
2023-06-01 11:02:05 +02:00
|
|
|
# Script Version: 1.3.1
|
2023-02-18 11:20:38 +02:00
|
|
|
|
|
|
|
# Give any parameter to allow some glyphs to be 2 'cells' wide.
|
|
|
|
# This might or might not be how they are currently handled while patching
|
2017-04-08 23:33:10 +02:00
|
|
|
|
|
|
|
text1='Testing'
|
|
|
|
text2='Nerd Fonts'
|
|
|
|
|
2023-02-18 18:07:29 +02:00
|
|
|
leftSymbolsCodes=('E0B0' 'E0B4' 'E0B8' 'E0BC' 'E0C0' 'E0C4' 'E0C6' 'E0C8' 'E0CC' 'E0CD' 'E0CE' 'E0CF' 'E0D0' 'E0D1' 'E0D2')
|
|
|
|
leftSymbols=('' '' '' '' '' '' '' '' '' '' '' '' '' '' '')
|
|
|
|
rightSymbolsCodes=('E0B2' 'E0B6' 'E0BA' 'E0BE' 'E0C2' 'E0C5' 'E0C7' 'E0CA' 'E0CC' 'E0CD' 'E0CE' 'E0CF' 'E0D0' 'E0D1' 'E0D4')
|
|
|
|
rightSymbols=('' '' '' '' '' '' '' '' '' '' '' '' '' '' '')
|
|
|
|
isWide=(0 0 0 0 1 1 1 1 1 1 1 1 1 1 0)
|
2017-04-08 23:33:10 +02:00
|
|
|
|
|
|
|
colorReset='\033[0m'
|
2023-06-01 11:02:05 +02:00
|
|
|
#colorBgWhite='\033[107m'
|
|
|
|
#colorBgLightBlue='\033[104m'
|
2023-02-18 18:07:29 +02:00
|
|
|
colorBgYellow='\033[103m'
|
2017-04-08 23:33:10 +02:00
|
|
|
colorBgBlack='\033[40m'
|
|
|
|
colorBg1='\033[100m'
|
|
|
|
colorBg2=$colorBgBlack
|
2023-02-18 18:07:29 +02:00
|
|
|
colorBg3=$colorBgYellow
|
|
|
|
|
2023-06-01 11:02:05 +02:00
|
|
|
#colorFgLightBlue='\033[94m'
|
2017-04-08 23:33:10 +02:00
|
|
|
colorFgLightGray='\033[90m'
|
2023-06-01 11:02:05 +02:00
|
|
|
#colorFgLightYellow='\033[93m'
|
2017-04-08 23:33:10 +02:00
|
|
|
colorFgBlack='\033[30m'
|
|
|
|
colorFg1=$colorFgBlack
|
|
|
|
colorFg2=$colorFgLightGray
|
|
|
|
colorBgDefault='\033[49m'
|
|
|
|
|
2023-02-18 18:07:29 +02:00
|
|
|
echo -e "$colorReset Nerd Fonts :: Testing Powerline Symbol size and alignment$colorBg3\\n$colorReset"
|
2017-04-08 23:33:10 +02:00
|
|
|
|
|
|
|
for i in "${!leftSymbolsCodes[@]}"; do
|
2023-02-18 11:20:38 +02:00
|
|
|
pad=' '
|
|
|
|
pad2=' '
|
2023-02-18 10:58:34 +02:00
|
|
|
symbol=${leftSymbols[$i]}
|
|
|
|
symbol2=${rightSymbols[$i]}
|
2017-04-08 23:33:10 +02:00
|
|
|
code="${leftSymbolsCodes[$i]}"
|
|
|
|
code2="${rightSymbolsCodes[$i]}"
|
|
|
|
|
2023-06-01 11:02:05 +02:00
|
|
|
if [ "${isWide[$i]}" -ge 1 ] && [ $# -ge 1 ]; then
|
2023-02-18 11:20:38 +02:00
|
|
|
symbol="${symbol} "
|
|
|
|
symbol2="${symbol2} "
|
|
|
|
pad=
|
|
|
|
pad2=
|
|
|
|
fi
|
2017-04-08 23:33:10 +02:00
|
|
|
if [ "$code" = "$code2" ]; then
|
2023-02-18 10:58:34 +02:00
|
|
|
symbol2=${rightSymbols[0]}
|
2017-04-08 23:33:10 +02:00
|
|
|
code2='None'
|
2023-02-18 11:20:38 +02:00
|
|
|
pad2=' '
|
2017-04-08 23:33:10 +02:00
|
|
|
fi
|
|
|
|
|
2023-02-18 18:07:29 +02:00
|
|
|
echo -e "$colorBg1$colorFg1$text1 $code $colorFg2$colorBg2$symbol$pad $text2 $pad$colorFg1$colorBgDefault$symbol -- $colorFg1$colorBgDefault$symbol2$colorFg2$colorBg2$pad2 $text2 $pad2$symbol2$colorBg1$colorFg1 $code2 $colorReset$colorBg3\\n$colorReset"
|
2017-04-08 23:33:10 +02:00
|
|
|
|
|
|
|
done
|
|
|
|
|
2023-02-18 18:07:29 +02:00
|
|
|
viSymbolsCodes=('E0A0' 'E0A1' 'E0A2' 'E0A3')
|
|
|
|
viSymbols=('' '' '' '')
|
|
|
|
|
2023-06-01 11:02:05 +02:00
|
|
|
line=
|
2023-02-18 18:07:29 +02:00
|
|
|
for i in "${!viSymbolsCodes[@]}"; do
|
|
|
|
symbol=${viSymbols[$i]}
|
|
|
|
code="${viSymbolsCodes[$i]}"
|
2023-06-01 11:02:05 +02:00
|
|
|
line="$line$colorBg1$colorFg1$text1 $code $colorFg1$colorBgDefault$symbol"
|
2023-02-18 18:07:29 +02:00
|
|
|
done
|
2023-06-01 11:02:05 +02:00
|
|
|
line="$line$colorBg1$colorFg1$text2$colorReset$colorBg3\\n$colorReset"
|
|
|
|
echo -e "$line"
|