#!/usr/pkg/bin/bash color_purple=$'\e[38;5;171m' color_pink=$'\e[38;5;201m' color_hotpink=$'\e[38;5;219m' r=$'\e[0m' mode=1 f () { o="$*" while read -r; do if [[ $mode -eq 1 ]]; then printf "i%s%s%s\tErr\ttilde.pink\t70\r\n" "$color_pink" "$REPLY" "$r" else printf "%s%s%s\r\n" "$color_pink" "$REPLY" "$r" fi done <<< "$o" } h () { o="$(printf "%s" "$1" | fold -sw 67)" while read -r line; do if [[ $mode -eq 1 ]]; then printf "i%s\tErr\ttilde.pink\t70\r\n" "$(make_purple ${line})" else printf "%s\r\n" "$(make_purple ${line})" fi done <<< "$o" } w () { o="$(printf "%s" "$1" | fold -sw 67)" while read -r line; do if [[ $mode -eq 1 ]]; then printf "i%s\tErr\ttilde.pink\t70\r\n" "$(make_pink ${line})" else printf "%s\r\n" "$(make_pink ${line})" fi done <<< "$o" } n () { if [[ $mode -eq 1 ]]; then printf "i\tErr\ttilde.pink\t70\r\n" else printf "\r\n" fi } make_hotpink () { printf "${color_hotpink}${*}${r}" } make_pink () { printf "${color_pink}${*}${r}" } make_purple () { printf "${color_purple}${*}${r}" } l () { type="$1" label="$2" path="$3" host="${4-tilde.pink}" port="${5-70}" link="$(make_hotpink $label)" if [[ "$type" == "h" ]]; then printf "%s%s\tURL:%s\ttilde.pink\t70\r\n" "$type" "$link" "$path" else printf "%s%s\t%s\t%s\t%s\r\n" "$type" "$link" "$path" "$host" "$port" fi }