From 5d71ccc174aafc22053ae0ca98a58ca216737499 Mon Sep 17 00:00:00 2001 From: Ryan Farley Date: Thu, 29 Apr 2021 04:12:55 -0500 Subject: enhanced bell configuration Add a separate section for bell configuration, with a bell-specific command option and a setting to allow that command to run without regard to keyboard focus (for those of us who enjoy being beeped at at all times, for example). The actions are also no longer mutually exclusive; this is primarily anticipating urgency support which cannot be replicated outside the process (in server mode anyway) and would thus be complementary to any notification or arbitrary command. --- foot.ini | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'foot.ini') diff --git a/foot.ini b/foot.ini index 81bfb489..5b348cf1 100644 --- a/foot.ini +++ b/foot.ini @@ -32,6 +32,12 @@ # workers= # osc8-underline=url-mode +[bell] +# urgent=false +# notify=false +# command= +# command_focused=false + [scrollback] # lines=1000 # multiplier=3.0 -- cgit v1.3 From 5df981d23fba6241e9e16c9f623d6790cf85040d Mon Sep 17 00:00:00 2001 From: Ryan Farley Date: Fri, 7 May 2021 07:16:48 -0500 Subject: consistent booleans in config, reset legacy bell --- config.c | 12 +++++++++--- foot.ini | 6 +++--- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'foot.ini') diff --git a/config.c b/config.c index 044e5fce..bf6e125a 100644 --- a/config.c +++ b/config.c @@ -605,11 +605,17 @@ parse_section_main(const char *key, const char *value, struct config *conf, }; tll_push_back(conf->notifications, deprecation); - if (strcmp(value, "set-urgency") == 0) + if (strcmp(value, "set-urgency") == 0) { + memset(&conf->bell, 0, sizeof(conf->bell)); conf->bell.urgent = true; - else if (strcmp(value, "notify") == 0) + } + else if (strcmp(value, "notify") == 0) { + memset(&conf->bell, 0, sizeof(conf->bell)); conf->bell.notify = true; - /* we do nothing by default, so none may be ignored */ + } + else if (strcmp(value, "none") == 0) { + memset(&conf->bell, 0, sizeof(conf->bell)); + } else { LOG_AND_NOTIFY_ERR( "%s%d: [default]: bell: " diff --git a/foot.ini b/foot.ini index 5b348cf1..6f0948a2 100644 --- a/foot.ini +++ b/foot.ini @@ -33,10 +33,10 @@ # osc8-underline=url-mode [bell] -# urgent=false -# notify=false +# urgent=no +# notify=no # command= -# command_focused=false +# command_focused=no [scrollback] # lines=1000 -- cgit v1.3