From 72e217fae26b7309f865f8d4a861bbb3fec816c4 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Sun, 1 Mar 2009 21:06:23 +0100 Subject: [PATCH] fix padding of $processes Padding to 4 digits allows for max 9999 processes, which should really be more than enough for systems running conky. ;) --- ChangeLog | 1 + src/conky.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2268b28e..4b277c27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * Added if_updatenr * Rewrite human_readable() to minimise amount of padding * Fix padding in temp_print() + * Fix padding of $processes and $running_processes 2009-02-17 * Added $battery_short patch, sf.net id #2300911 (thanks Swoog) diff --git a/src/conky.c b/src/conky.c index 611d4da9..21328cc6 100644 --- a/src/conky.c +++ b/src/conky.c @@ -4119,10 +4119,10 @@ static void generate_text_internal(char *p, int p_max_size, new_outline(p, obj->data.l); } OBJ(processes) { - spaced_print(p, p_max_size, "%hu", 5, cur->procs); + spaced_print(p, p_max_size, "%hu", 4, cur->procs); } OBJ(running_processes) { - spaced_print(p, p_max_size, "%hu", 3, cur->run_procs); + spaced_print(p, p_max_size, "%hu", 4, cur->run_procs); } OBJ(text) { snprintf(p, p_max_size, "%s", obj->data.s);