diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index c154758b..c6cf1719 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -49,14 +49,18 @@ const figures = isUnicodeSupported() ? figuresDefault : figuresFallback function log(type, label, msg) { let icon, message + let fittedLabel = label + while(fittedLabel.length < 14) { + fittedLabel = fittedLabel.length % 2 === 1 ? fittedLabel + ' ' : ' ' + fittedLabel + } if (type === 'info') { - icon = `${chalk.cyanBright(figures.pointer)} ${chalk.bold.white.bgCyan(' ' + label.padStart(label.length / 2 + 4, ' ').padEnd(label.length / 2 + 4, ' ') + ' ')}` + icon = `${chalk.cyanBright(figures.pointer)} ${chalk.bold.white.bgCyan(' ' + fittedLabel + ' ')}` message = wrapMessage(msg) } else if (type === 'star') { - icon = `${chalk.yellow(figures.star)} ${chalk.bold.black.bgYellow(' ' + label.padStart(label.length / 2 + 4, ' ').padEnd(label.length / 2 + 4, ' ') + ' ')}` + icon = `${chalk.yellow(figures.star)} ${chalk.bold.black.bgYellow(' ' + fittedLabel + ' ')}` message = wrapMessage(msg) } else if (type === 'success') { - icon = `${chalk.greenBright(figures.play)} ${chalk.bold.white.bgGreenBright(' ' + label.padStart(label.length / 2 + 4, ' ').padEnd(label.length / 2 + 4, ' ') + ' ')}` + icon = `${chalk.greenBright(figures.play)} ${chalk.bold.white.bgGreenBright(' ' + fittedLabel + ' ')}` message = wrapMessage(msg) } else if (type === 'warn') { icon = `${chalk.yellowBright(figures.lozenge)} ${chalk.bold.black.bgYellowBright(' WARNING ')}`