feature: display status with a different shape depending on the status (#17728)
This commit is contained in:
committed by
Lennart Poettering
parent
95457dc13c
commit
9ae5fed64e
@@ -117,7 +117,7 @@ static int list_dependencies_one(
|
||||
break;
|
||||
}
|
||||
|
||||
printf("%s%s%s ", on, special_glyph(SPECIAL_GLYPH_BLACK_CIRCLE), ansi_normal());
|
||||
printf("%s%s%s ", on, special_glyph(unit_active_state_to_glyph(active_state)), ansi_normal());
|
||||
}
|
||||
|
||||
r = list_dependencies_print(*c, level, branches, c[1] == NULL);
|
||||
|
||||
@@ -314,7 +314,9 @@ static void print_status_info(
|
||||
|
||||
format_active_state(i->active_state, &active_on, &active_off);
|
||||
|
||||
printf("%s%s%s %s", active_on, special_glyph(SPECIAL_GLYPH_BLACK_CIRCLE), active_off, strna(i->id));
|
||||
const SpecialGlyph glyph = unit_active_state_to_glyph(unit_active_state_from_string(i->active_state));
|
||||
|
||||
printf("%s%s%s %s", active_on, special_glyph(glyph), active_off, strna(i->id));
|
||||
|
||||
if (i->description && !streq_ptr(i->id, i->description))
|
||||
printf(" - %s", i->description);
|
||||
@@ -433,7 +435,7 @@ static void print_status_info(
|
||||
|
||||
printf("%s %s%s%s %s\n",
|
||||
t == i->triggered_by ? "TriggeredBy:" : " ",
|
||||
on, special_glyph(SPECIAL_GLYPH_BLACK_CIRCLE), off,
|
||||
on, special_glyph(unit_active_state_to_glyph(state)), off,
|
||||
*t);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user