nausea

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

commit 4bbcbfdec00d3dc0cc40cb6533d8a5a8a3eafa2e
parent 008c80ec3b2f2e127cc5d94fbccefcf6f4dc0e2e
Author: lostd <lostd@2f30.org>
Date:   Wed, 17 Jun 2015 09:09:46 +0100

Add freeze key

Diffstat:
Mnausea.1 | 2++
Mnausea.c | 7++++++-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/nausea.1 b/nausea.1 @@ -66,6 +66,8 @@ Toggle bounce mode. Cycle visualizations in ascending order. .It N or [Left] Cycle visualizations in descending order. +.It [Space] +Freeze output. .El .Sh AUTHORS .Nm diff --git a/nausea.c b/nausea.c @@ -32,6 +32,7 @@ static int keep; static int left; static int bounce; static int die; +static int freeze; struct frame { int fd; @@ -788,6 +789,9 @@ main(int argc, char *argv[]) case KEY_LEFT: vidx = vidx == 0 ? LEN(visuals) - 1 : vidx - 1; break; + case ' ': + freeze = !freeze; + break; } /* detect visualization change */ @@ -801,7 +805,8 @@ main(int argc, char *argv[]) (void)use_default_colors(); update(&fr); - visuals[vidx].draw(&fr); + if (!freeze) + visuals[vidx].draw(&fr); vidx_prev = vidx; }