diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-06-29 18:12:32 +0300 |
---|---|---|
committer | delthas <delthas@dille.cc> | 2022-08-01 02:54:30 +0200 |
commit | e8ed8e7e13134ee7fc8ac116d58efc55813632a1 (patch) | |
tree | 672ff545386a4b9cd2c0bc0516d7362e6242f62d /config.go | |
parent | Add support for hex colors (diff) |
Add a config option to beep on highlight
This will allow to bring user attention when you are getting
highlighted.
Diffstat (limited to 'config.go')
-rw-r--r-- | config.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -63,6 +63,7 @@ type Config struct { Highlights []string OnHighlightPath string + OnHighlightBeep bool NickColWidth int ChanColWidth int ChanColEnabled bool @@ -96,6 +97,7 @@ func Defaults() (cfg Config, err error) { Mouse: true, Highlights: nil, OnHighlightPath: "", + OnHighlightBeep: false, NickColWidth: 14, ChanColWidth: 16, ChanColEnabled: true, @@ -197,6 +199,15 @@ func unmarshal(filename string, cfg *Config) (err error) { if err := d.ParseParams(&cfg.OnHighlightPath); err != nil { return err } + case "on-highlight-beep": + var onHighlightBeep string + if err := d.ParseParams(&onHighlightBeep); err != nil { + return err + } + + if cfg.OnHighlightBeep, err = strconv.ParseBool(onHighlightBeep); err != nil { + return err + } case "pane-widths": for _, child := range d.Children { switch child.Name { |