From af08a8d3f96a257a541cb94d1a2df242e2ef7352 Mon Sep 17 00:00:00 2001 From: Karl Stavestrand Date: Fri, 22 Nov 2019 22:21:21 +0100 Subject: [PATCH] fix macos vt detected as tty #157 --- cava.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cava.c b/cava.c index 4b53586..91e5bd1 100644 --- a/cava.c +++ b/cava.c @@ -381,6 +381,8 @@ as of 0.4.0 all options are specified in config file, see in '/home/username/.co if (strncmp(ttyname(0), "/dev/tty", 8) == 0 || strcmp(ttyname(0), "/dev/console") == 0) inAtty = 1; + //in macos vitual terminals are called ttys(xyz) and there are no ttys + if (strncmp(ttyname(0), "/dev/ttys", 9) == 0) inAtty = 0; if (inAtty) { system("setfont cava.psf >/dev/null 2>&1"); system("setterm -blank 0");