]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: right-align left/passed columns in list-timers
authorLennart Poettering <lennart@poettering.net>
Wed, 22 Feb 2023 12:40:53 +0000 (13:40 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 22 Feb 2023 17:59:15 +0000 (18:59 +0100)
Timespans are probably best right-aligned, in particular if they
systematically end in either " ago" or " left" because they are used as
"relative timestamps".

src/systemctl/systemctl-list-units.c

index 86e7311d3c41dff050c86ae288149ae7a1c92595..93dd4b7dfd2688c11afa139b6622a49b8f660086 100644 (file)
@@ -616,6 +616,9 @@ static int output_timers_list(struct timer_info *timer_infos, size_t n) {
 
         table_set_ersatz_string(table, TABLE_ERSATZ_DASH);
 
+        (void) table_set_align_percent(table, table_get_cell(table, 0, 1), 100);
+        (void) table_set_align_percent(table, table_get_cell(table, 0, 3), 100);
+
         for (struct timer_info *t = timer_infos; t < timer_infos + n; t++) {
                 _cleanup_free_ char *unit = NULL;