Skip to content

Commit 3cc7a10

Browse files
authored
Merge pull request #151 from holic/holic/exit-0-color
use blue for exit code 0
2 parents 6735eaa + 4eee12a commit 3cc7a10

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/ui_procs.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,16 @@ fn create_proc_item<'a>(
6868
.add_modifier(Modifier::BOLD),
6969
)
7070
} else {
71-
let status = match proc_handle.exit_code() {
72-
Some(exit_code) => format!(" DOWN ({})", exit_code),
73-
None => " DOWN ".to_string(),
74-
};
75-
Span::styled(status, Style::default().fg(Color::LightRed))
71+
match proc_handle.exit_code() {
72+
Some(0) => {
73+
Span::styled(" DOWN (0)", Style::default().fg(Color::LightBlue))
74+
}
75+
Some(exit_code) => Span::styled(
76+
format!(" DOWN ({})", exit_code),
77+
Style::default().fg(Color::LightRed),
78+
),
79+
None => Span::styled(" DOWN ", Style::default().fg(Color::LightRed)),
80+
}
7681
};
7782

7883
let mark = if is_cur {

0 commit comments

Comments
 (0)