summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtz.pm>2021-04-27 14:41:45 +0200
committerHubert Hirtz <hubert@hirtz.pm>2021-04-27 14:48:48 +0200
commitef1ca1c2efcab9886d3781193b0cafb552ac8689 (patch)
treefa9978561c23320bd2155b50c5cc18063005a33a
parentRevert back to tcell 2.2.0 (diff)
Add option to disable sending typing notifications
-rw-r--r--app.go2
-rw-r--r--config.go2
-rw-r--r--doc/senpai.5.scd6
3 files changed, 8 insertions, 2 deletions
diff --git a/app.go b/app.go
index 13d77ab..c30c3ea 100644
--- a/app.go
+++ b/app.go
@@ -567,7 +567,7 @@ func (app *App) notifyHighlight(buffer, nick, content string) {
// typing sends typing notifications to the IRC server according to the user
// input.
func (app *App) typing() {
- if app.s == nil {
+ if app.s == nil || app.cfg.NoTypings {
return
}
buffer := app.win.CurrentBuffer()
diff --git a/config.go b/config.go
index 6b2a2f8..dde65de 100644
--- a/config.go
+++ b/config.go
@@ -15,6 +15,8 @@ type Config struct {
Password *string
NoTLS bool `yaml:"no-tls"`
+ NoTypings bool `yaml:"no-typings"`
+
Highlights []string
OnHighlight string `yaml:"on-highlight"`
NickColWidth int `yaml:"nick-column-width"`
diff --git a/doc/senpai.5.scd b/doc/senpai.5.scd
index 236ef78..bd0ce49 100644
--- a/doc/senpai.5.scd
+++ b/doc/senpai.5.scd
@@ -62,7 +62,11 @@ Some settings are required, the others are optional.
The number of cell that the column for channels occupies. By default, 16.
*no-tls*
- Disable TLS encryption. By default, false.
+ Disable TLS encryption. Defaults to false.
+
+*no-typings*
+ Prevent senpai from sending typing notifications and let others know when
+ you are typing a message. Defaults to false.
*debug*
Dump all sent and received data to the home buffer, useful for debugging.