diff options
Diffstat (limited to 'src/print_run_watch.c')
-rw-r--r-- | src/print_run_watch.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/print_run_watch.c b/src/print_run_watch.c new file mode 100644 index 0000000..391467e --- /dev/null +++ b/src/print_run_watch.c @@ -0,0 +1,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()); +} |