From f8e3414af06df95b18b8e29caa74a7eea3022c92 Mon Sep 17 00:00:00 2001 From: Klemens Nanni Date: Sat, 17 Jul 2021 20:04:15 +0000 Subject: Add -q/quiet option to raise default message visibility threshold Silencing all windows with `M-+' (across multiple catgirl instances) can be cumbersome, so provide an option to hide events, JOIN/PART noise, etc. by default (each window's threshold will persist across load/save cycles, i.e. when using the `-s/save' option). Started out as `-v | visibility = threshold' to set a specific level, the idea of a simpler toggle comes from june, who also squashed other bugs (as usual). --- ui.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui.c') diff --git a/ui.c b/ui.c index da06342..3604057 100644 --- a/ui.c +++ b/ui.c @@ -127,6 +127,8 @@ static struct Window *windowRemove(uint num) { return window; } +enum Heat uiThreshold = Cold; + static uint windowFor(uint id) { for (uint num = 0; num < windows.len; ++num) { if (windows.ptrs[num]->id == id) return num; @@ -136,7 +138,7 @@ static uint windowFor(uint id) { window->id = id; window->mark = true; window->time = uiTime.enable; - window->thresh = Cold; + window->thresh = uiThreshold; window->buffer = bufferAlloc(); completeAdd(None, idNames[id], idColors[id]); return windowPush(window); -- cgit 1.4.1-2-gfad0