From 245996141ed338760f147416051ceb5cfde1ec74 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Mon, 22 May 2023 12:35:02 +0200 Subject: Add a little styling to the header --- lib/subcommands/top.bash | 4 ++-- 1 file 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/[^ ]* *//')" \ -- cgit v1.1