hirc

IRC client
Log | Files | Refs

commit ac00d91b91e9a1b8e6b550a576d5691806b1c6fe
parent 45d69d44eda962c7b8ff19d168a5844adf5eda9e
Author: hhvn <dev@hhvn.uk>
Date:   Sat,  2 Apr 2022 13:19:45 +0100

beep() on hilight

Diffstat:
Msrc/config.c | 6++++++
Msrc/hist.c | 3+++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/config.c b/src/config.c @@ -187,6 +187,12 @@ struct Config config[] = { .strhandle = NULL, .description = { "Message to send on /kill", NULL}}, + {"misc.bell", 1, Val_bool, + .num = 1, + .numhandle = config_redrawl, + .description = { + "Send an audible bell on highlights or messages.", + "Often triggers some other form of action in graphical environments.", NULL}}, {"completion.hchar", 1, Val_string, .str = ",", .strhandle = NULL, diff --git a/src/hist.c b/src/hist.c @@ -173,6 +173,9 @@ hist_add(struct HistInfo *histinfo, histinfo->history = new; ui: + if (options & HIST_SHOW && activity >= Activity_hilight && config_getl("misc.bell")) + beep(); + if (histinfo && options & HIST_SHOW && activity > histinfo->activity && histinfo != selected.history) { histinfo->activity = activity; windows[Win_buflist].refresh = 1;