5 void print_run_watch(const char *title, const char *pidfile, const char *format) {
6 bool running = process_runs(pidfile);
9 if (output_format == O_I3BAR)
10 printf("{\"name\":\"run_watch\", \"instance\": \"%s\", ", pidfile);
12 printf("%s", (running ? color("color_good") : color("color_bad")));
14 if (output_format == O_I3BAR)
15 printf("\"full_text\":\"");
17 for (walk = format; *walk != '\0'; walk++) {
23 if (strncmp(walk+1, "title", strlen("title")) == 0) {
25 walk += strlen("title");
26 } else if (strncmp(walk+1, "status", strlen("status")) == 0) {
27 printf("%s", (running ? "yes" : "no"));
28 walk += strlen("status");
32 printf("%s", endcolor());
34 if (output_format == O_I3BAR)