tLeft-pad output in cpu plugin with spaces - spoon - dwm status utility (2f30 f… | |
git clone git://src.adamsgaard.dk/spoon | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 0b575aa3989ee877769a104c83203dbce2ff2e55 | |
parent 9b415ce6f5826b77f3427d64e388f5fbcd8cab11 | |
Author: sin <[email protected]> | |
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(-) | |
--- | |
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; | |
} | |