summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
authorKlemens Nanni <klemens@posteo.de>2021-07-17 20:04:15 +0000
committerJune McEnroe <june@causal.agency>2021-07-20 12:03:46 -0400
commitf8e3414af06df95b18b8e29caa74a7eea3022c92 (patch)
tree3924d2b8519cabb3d43c2114e243ba5b889ffa2b /chat.c
parentchat.tmux.conf: Fix base-index setting (diff)
downloadcatgirl-f8e3414af06df95b18b8e29caa74a7eea3022c92.tar.gz
catgirl-f8e3414af06df95b18b8e29caa74a7eea3022c92.zip
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).
Diffstat (limited to '')
-rw-r--r--chat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/chat.c b/chat.c
index 106e05f..3141052 100644
--- a/chat.c
+++ b/chat.c
@@ -257,6 +257,7 @@ int main(int argc, char *argv[]) {
 		{ .val = 'n', .name = "nick", required_argument },
 		{ .val = 'o', .name = "print-chain", no_argument },
 		{ .val = 'p', .name = "port", required_argument },
+		{ .val = 'q', .name = "quiet", no_argument },
 		{ .val = 'r', .name = "real", required_argument },
 		{ .val = 's', .name = "save", required_argument },
 		{ .val = 't', .name = "trust", required_argument },
@@ -300,6 +301,7 @@ int main(int argc, char *argv[]) {
 			break; case 'n': nick = optarg;
 			break; case 'o': printCert = true;
 			break; case 'p': port = optarg;
+			break; case 'q': uiThreshold = Warm;
 			break; case 'r': real = optarg;
 			break; case 's': save = optarg;
 			break; case 't': trust = optarg;