Added tBoldBox and color constants.
This commit is contained in:
parent
652877382d
commit
c3050750ea
1 changed files with 33 additions and 0 deletions
33
towel.sh
33
towel.sh
|
@ -24,6 +24,39 @@
|
|||
#
|
||||
|
||||
|
||||
#
|
||||
# Color constants for tBoldBox.
|
||||
#
|
||||
tRED=1
|
||||
tGREEN=2
|
||||
tYELLOW=3
|
||||
tBLUE=4
|
||||
tPURPLE=5
|
||||
tCYAN=6
|
||||
|
||||
|
||||
#
|
||||
# Draws bold white text inside a colored box.
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# COLOR - Towel color constant for box background color.
|
||||
# TEXT - Text to display.
|
||||
#
|
||||
function tBoldBox() {
|
||||
local __COLOR=$1
|
||||
local __TEXT=$2
|
||||
local __LEN=$((${#__TEXT}+6))
|
||||
local __SPACES=$(printf "%${__LEN}s")
|
||||
|
||||
__COLOR=${!__COLOR}
|
||||
|
||||
echo -e "\e[1m\e[4${__COLOR}m${__SPACES}\e[0m"
|
||||
echo -e "\e[1m\e[4${__COLOR}m ${__TEXT} \e[0m"
|
||||
echo -e "\e[1m\e[4${__COLOR}m${__SPACES}\e[0m"
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Checks to see if listed packages have been installed.
|
||||
# Currently DEB packages only.
|
||||
|
|
Loading…
Add table
Reference in a new issue