File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ clrBlue=4
1616clrPurple=5
1717clrCyan=6
1818clrWhite=7
19+ clrGray=237
1920
2021# Globals (SUBJECT TO CUSTOMIZATION)
2122waitstatus=true # whether to wait for key press after menu command finished
@@ -429,7 +430,8 @@ callKeyFunktion () {
429430 IFS=" $delimiter " read -r key description action submenu menu column <<< " $i"
430431 if [ " $1 " = " $key " ]
431432 then
432- clear && importantLog " $action "
433+ clear && actionBanner " $description "
434+ importantLog " $action "
433435 eval " $action "
434436 return 1
435437 fi
@@ -438,6 +440,13 @@ callKeyFunktion () {
438440 IFS=$OLD_IFS
439441}
440442
443+ actionBanner () {
444+ local bannerline=" $( r_pad " Action Execution" " 75" " " ) "
445+ coloredLog " $bannerline " $clrWhite $clrBlue && echo
446+ local actionline=" $( r_pad " $1 " " 75" " " ) "
447+ coloredLog " $actionline " $clrWhite $clrGray && echo
448+ }
449+
441450# ################################################
442451# Generates the menu from the menudatamap.
443452# Globals:
@@ -591,9 +600,10 @@ printSubmenuHeading(){
591600# Padded line to stdout
592601# ################################################
593602r_pad () {
594- local text=$1
595- local length=${# text}
596- local width=${2:- $length }
603+ local text=" $1 "
604+ local length=" ${# text} "
605+ local width=" ${2:- $length } "
606+ local symbol=" ${3:- } "
597607 local paddedcount=$(( width - length ))
598608 local printout=" $text $( printf " %-${paddedcount} s" " " | tr " " " $symbol " ) "
599609 printf " %s" " $printout "
You can’t perform that action at this time.
0 commit comments