aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toys/posix/ps.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index deab730b..75e8f54b 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -1550,8 +1550,13 @@ static void top_common(
recalc = 1;
for (i = 0; i<lines && i+topoff<mix.count; i++) {
+ // Running processes are shown in bold.
+ int bold = !(toys.optflags&FLAG_b) && mix.tb[i+topoff]->state == 'R';
+
if (!(toys.optflags&FLAG_b) && i) xputc('\n');
+ if (bold) printf("\033[1m");
show_ps(mix.tb[i+topoff]);
+ if (bold) printf("\033[m");
}
if (TT.top.n && !--TT.top.n) {