summaryrefslogtreecommitdiff
path: root/src/print_run_watch.c
blob: 391467ea2a423233865196fb87f862ff58cd325a (plain)
1
2
3
4
5
6
7
8
9
10
#include <stdio.h>
#include "i3status.h"

void print_run_watch(const char *title, const char *pidfile, const char *format) {
	bool running = process_runs(pidfile);
	printf("%s%s: %s%s",
		(running ? color("#00FF00") : color("#FF0000")),
		title,
		(running ? "yes" : "no"), endcolor());
}