mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-04 07:15:29 -04:00
Enable the use of flash as visual bell
With this patch we can configure flash in the bell section. The colors section allow now to configure the color and translucency of the flash.
This commit is contained in:
parent
c50b1f9900
commit
8273962372
8 changed files with 60 additions and 2 deletions
|
|
@ -1170,6 +1170,8 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper,
|
|||
.colors = {
|
||||
.fg = conf->colors.fg,
|
||||
.bg = conf->colors.bg,
|
||||
.flash = conf->colors.flash,
|
||||
.flash_alpha = conf->colors.flash_alpha,
|
||||
.alpha = conf->colors.alpha,
|
||||
.selection_fg = conf->colors.selection_fg,
|
||||
.selection_bg = conf->colors.selection_bg,
|
||||
|
|
@ -1922,7 +1924,9 @@ term_reset(struct terminal *term, bool hard)
|
|||
fdm_del(term->fdm, term->blink.fd); term->blink.fd = -1;
|
||||
term->colors.fg = term->conf->colors.fg;
|
||||
term->colors.bg = term->conf->colors.bg;
|
||||
term->colors.flash = term->conf->colors.flash;
|
||||
term->colors.alpha = term->conf->colors.alpha;
|
||||
term->colors.flash_alpha = term->conf->colors.flash_alpha;
|
||||
term->colors.selection_fg = term->conf->colors.selection_fg;
|
||||
term->colors.selection_bg = term->conf->colors.selection_bg;
|
||||
term->colors.use_custom_selection = term->conf->colors.use_custom.selection;
|
||||
|
|
@ -3270,6 +3274,7 @@ term_flash(struct terminal *term, unsigned duration_ms)
|
|||
void
|
||||
term_bell(struct terminal *term)
|
||||
{
|
||||
|
||||
if (!term->bell_action_enabled)
|
||||
return;
|
||||
|
||||
|
|
@ -3288,6 +3293,9 @@ term_bell(struct terminal *term)
|
|||
if (term->conf->bell.notify)
|
||||
notify_notify(term, "Bell", "Bell in terminal");
|
||||
|
||||
if (term->conf->bell.flash)
|
||||
term_flash(term, 100);
|
||||
|
||||
if ((term->conf->bell.command.argv.args != NULL) &&
|
||||
(!term->kbd_focus || term->conf->bell.command_focused))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue