ztatus

[discontinued] Status bar for dwm, and simple notification daemon.
git clone https://noxz.tech/git/ztatus.git
ztatus

commit: 7a5920fdb81ad5d2347b813cf9223119e9c6177d
parent: b83fee8c437e333a3dafe030e60b35d86ae8bfb9
author: Chris Noxz <chris@noxz.tech>
date:   Thu, 3 Jan 2019 14:14:27 +0100
Fix some overhang
Mztatus.c8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/ztatus.c b/ztatus.c
@@ -193,7 +193,8 @@ daemonize(void)
                 continue;
             if (elements[i].arg.t && (
                 (elements[i].arg.t > 0 && count % elements[i].arg.t == 0)
-                || (elements[i].arg.t < 0 && count >= 0 && count % elements[i].arg.t == 0)
+                || (elements[i].arg.t < 0 && count >= 0
+                    && count % elements[i].arg.t == 0)
             ))
                 is_changed |= elements[i].handler(&(elements[i].value));
         }
@@ -328,7 +329,7 @@ check_proc(struct dirent *e)
         l = ftell(fptr);
         fclose(fptr);
         if (l - 1 > strlen(cmdline))
-            memmove(cmdline, cmdline + strlen(cmdline) + 1, l - strlen(cmdline));
+            memmove(cmdline, cmdline + strlen(cmdline)+1, l - strlen(cmdline));
         if (strcmp(cmdline, "-d") == 0)
             return pid;
     }
@@ -466,7 +467,8 @@ get_power(int *value)
     fscanf(fp, "%c", &status);
     fclose(fp);
 
-    *value = ((float)energy_now * 1000 / (float)voltage_now) * 100 / ((float)energy_full * 1000 / (float)voltage_now);
+    *value = ((float)energy_now * 1000 / (float)voltage_now) * 100 /\
+        ((float)energy_full * 1000 / (float)voltage_now);
     *value += status != 'D' ? 1000 : 0;
 
     if (*value != old_value || (*value >= 1000) != old_state)