nausea

curses audio visualizer
git clone git://git.2f30.org/nausea
Log | Files | Refs | README | LICENSE

commit 1705443f6e057011e15e69fafd89e8b7c3ffce74
parent eb3118fd6101ab489bb071504c75b5fb87cbf897
Author: lostd <lostd@2f30.org>
Date:   Sun,  4 May 2014 00:53:49 +0300

Make command-line flags available as runtime options

Diffstat:
Mnausea.c | 15++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/nausea.c b/nausea.c @@ -317,8 +317,21 @@ main(int argc, char *argv[]) } while (!die) { - if (getch() == 'q') + switch (getch()) { + case 'q': die = 1; + break; + case 'c': + colors = ~colors; + if (colors) + (void)initcolors(); + else + (void)use_default_colors(); + break; + case 'p': + peaks = ~peaks; + break; + } update(&fr); draw(&fr);