Skip to content

Commit

Permalink
disable blanking, for real this time
Browse files Browse the repository at this point in the history
  • Loading branch information
karlstav committed Nov 24, 2023
1 parent 49a137e commit 638fefe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion cava.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ as of 0.4.0 all options are specified in config file, see in '/home/username/.co

output_mode = p.output;
#ifndef _MSC_VER
if (output_mode != OUTPUT_NCURSES || output_mode != OUTPUT_NONCURSES) {
if (output_mode == OUTPUT_NCURSES || output_mode == OUTPUT_NONCURSES) {
// Check if we're running in a tty
if (strncmp(ttyname(0), "/dev/tty", 8) == 0 || strcmp(ttyname(0), "/dev/console") == 0)
inAtty = 1;
Expand Down
2 changes: 0 additions & 2 deletions output/terminal_noncurses.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ int init_terminal_noncurses(int tty, char *const fg_color_string, char *const bg

#else
system("setterm -cursor off");
system("setterm -blank 0");
system("clear");
#endif

Expand Down Expand Up @@ -417,7 +416,6 @@ void cleanup_terminal_noncurses(void) {
system("setfont >/dev/null 2>&1");
system("setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz >/dev/null 2>&1");
system("setterm -cursor on");
system("setterm -blank 10");
system("clear");
#endif
printf("\033[0m\n");
Expand Down

0 comments on commit 638fefe

Please sign in to comment.