aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-05-22 12:35:02 +0200
committerPatrick Spek <p.spek@tyil.nl>2023-05-22 12:35:02 +0200
commit245996141ed338760f147416051ceb5cfde1ec74 (patch)
tree323d207c6a1fa3233b4158ced9b92a0eedd667a7
parent99253280000dacf1bae22dc8d3b5d888b61deb77 (diff)
Add a little styling to the header
-rw-r--r--lib/subcommands/top.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/subcommands/top.bash b/lib/subcommands/top.bash
index a8806af..d4a9b3f 100644
--- a/lib/subcommands/top.bash
+++ b/lib/subcommands/top.bash
@@ -94,7 +94,7 @@ subcommand()
done
# Print results
- printf "%-${widths[node]}s %-${widths[load]}s %-${widths[memory]}s %-${widths[storage]}s %-${widths[uptime]}s\n" \
+ printf "$(tput bold)%-${widths[node]}s %-${widths[load]}s %-${widths[memory]}s %-${widths[storage]}s %-${widths[uptime]}s$(tput sgr0)\n" \
"Node" \
"Load" \
"Memory" \
@@ -103,7 +103,7 @@ subcommand()
for node in "${!results[@]}"
do
- printf "%-${widths[node]}s %-${widths[load]}s %${widths[memory]}s %${widths[storage]}s %${widths[uptime]}s\n" \
+ printf "%-${widths[node]}s %${widths[load]}s %${widths[memory]}s %${widths[storage]}s %${widths[uptime]}s\n" \
"$node" \
"$(grep '^load' <<< "${results["$node"]}" | sed 's/[^ ]* *//')" \
"$(grep '^memory' <<< "${results["$node"]}" | sed 's/[^ ]* *//')" \