Merged in rs232/nvram_ops-added-centralised-console-fon-1721897716373 (pull request #207)

nvram_ops - added centralised console font & background color definition
arm-master
rs232 1 year ago committed by pedro
commit 3a39aff0b5

@ -1,4 +1,5 @@
#!/bin/sh
## <-- NVRAM operations
alias NG="nvram get"
alias NS="nvram set"
alias NU="nvram unset"
@ -7,3 +8,42 @@ alias NC="nvram commit"
alias NE='_vrb(){ nvram show 2>/dev/null | grep -Eq "^${1}=" && echo "1" || echo "0"; }; _vrb'
# NP (nvram populated): NP returns 1 if the variable is defined and not null, otherwise 0
alias NP='_vrb(){ [ $(nvram get "${1}" 2>/dev/null | wc -c) -gt "0" ] && echo "1" || echo "0";}; _vrb'
## NVRAM -->
## <-- COLORS
# Usage: echo -e ${b_color}${f_color}Hello World${b_black}
# BACKGROUNDS
b_black="\033[40m" # use this to also fully reset colors
b_red="\033[41m"
b_green="\033[42m"
b_yellow="\033[43m"
b_blue="\033[44m"
b_magenta="\033[45m
b_cyan="\033[46m"
b_white="\033[47m"
b_grey="\033[100m"
b_light_red="\033[101m"
b_light_green="\033[102m"
b_light_yellow="\033[103m"
b_light_blue="\033[104m"
b_light_magenta="\033[105m"
b_light_cyan="\033[106m"
b_light_white="\033[107m"
# FONTS
f_black="\033[30m"
f_red="\033[31m"
f_green="\033[32m"
f_yellow="\033[33m"
f_blue="\033[34m"
f_magenta="\033[35m
f_cyan="\033[36m"
f_white="\033[37m"
f_grey="\033[90m"
f_light_red="\033[91m"
f_light_green="\033[92m!"
f_light_yellow="\033[93m"
f_light_blue="\033[94m"
f_light_magenta="\033[95m"
f_light_cyan="\033[96m"
f_light_white="\033[97m"
## COLORS -->
Loading…
Cancel
Save