]> git.sur5r.net Git - i3/i3status/blobdiff - src/auto_detect_format.c
Implement term-output-format
[i3/i3status] / src / auto_detect_format.c
index 6ec5f731d906eb1269c2bdc2b26fd23a39439914..524e2e9d9b40a0737a2c45a5cd5eaca92b12965f 100644 (file)
  *
  */
 char *auto_detect_format(void) {
+    /* If stdout is a tty, we output directly to a terminal. */
+    if (isatty(STDOUT_FILENO)) {
+        return "term";
+    }
+
     pid_t myppid = getppid();
     pid_t mypid = getpid();