2 # SPDX-License-Identifier: GPL-3.0
6 # Email : m.k419sabuaka@gmail.com
8 # (c) 2019-2020 Fascode Network.
13 while getopts 't:b:d:' arg; do
15 t) textcolor="${OPTARG}" ;;
16 b) backcolor="${OPTARG}" ;;
17 d) deco="${OPTARG}" ;;
18 *) echo "Invalid argument '${OPTARG}'" ;;
24 if [[ -n "${deco}" ]]; then
26 0) decotypes="sgr 0" ;;
27 1) decotypes="bold" ;;
28 4) decotypes="smul" ;;
29 5) decotypes="blink" ;;
30 *) echo "Invalid argument '${deco}'" ;;
34 echo "$([[ -n "${textcolor}" ]] && tput setaf "${textcolor}")$([[ -n "${backcolor}" ]] && tput setab "${backcolor}")$([[ -n "${decotypes}" ]] && tput "${decotypes}")${*}$(tput sgr0)"