From e894a8bf01da2417449ab78459f9539c694a1a34 Mon Sep 17 00:00:00 2001 From: Johannes Truschnigg Date: Sat, 3 Sep 2022 16:09:24 +0200 Subject: [PATCH] Make headers more pretty --- sqm_lagthrottle_suggest_config.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sqm_lagthrottle_suggest_config.sh b/sqm_lagthrottle_suggest_config.sh index 10296ab..1b91d01 100755 --- a/sqm_lagthrottle_suggest_config.sh +++ b/sqm_lagthrottle_suggest_config.sh @@ -31,11 +31,21 @@ _goon() { printf '\n\n' >&2 } +_bar() { + local lcnt=0 + while [ $lcnt -lt $1 ] + do + printf '=' + let lcnt++ + done + printf '\n' +} + _h() { local l - l=$(( 60 - ${#1} )) + l=$(( 70 - ${#1} )) clear - printf '=== [ %s ] %'"${l}"'s \n\n\n' "${1}" "===" >&2 + printf '=== [ %s ] %s \n\n\n' "${1}" "$(_bar $l)" >&2 } -- 2.39.5