tLeft-pad output in cpu plugin with spaces - spoon - dwm status utility (2f30 fork)
HTML git clone git://src.adamsgaard.dk/spoon
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
DIR commit 0b575aa3989ee877769a104c83203dbce2ff2e55
DIR parent 9b415ce6f5826b77f3427d64e388f5fbcd8cab11
HTML Author: sin <sin@2f30.org>
Date: Tue, 17 May 2016 17:18:32 +0100
Left-pad output in cpu plugin with spaces
Diffstat:
M spoon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/spoon.c b/spoon.c
t@@ -103,7 +103,7 @@ cpuread(char *buf, size_t len)
sz = sizeof(cpuspeed);
if (sysctl(mib, 2, &cpuspeed, &sz, NULL, 0) < 0)
return -1;
- snprintf(buf, len, "%d", cpuspeed);
+ snprintf(buf, len, "%4d", cpuspeed);
return 0;
}