From 8d51edec17fa82b130fed8590eb7a05e52f899f3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 2 May 2018 22:05:38 +0530 Subject: [PATCH] Option to disable bell symbol on tab --- kitty/config.py | 1 + kitty/kitty.conf | 4 ++++ kitty/tabs.py | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/kitty/config.py b/kitty/config.py index 251162ab2..b4c51b7cf 100644 --- a/kitty/config.py +++ b/kitty/config.py @@ -353,6 +353,7 @@ type_map = { 'copy_on_select': to_bool, 'window_alert_on_bell': to_bool, 'tab_bar_edge': tab_bar_edge, + 'bell_on_tab': to_bool, 'kitty_mod': to_modifiers, 'clear_all_shortcuts': to_bool, } diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 6c224152c..b64099eb4 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -170,6 +170,10 @@ enable_audio_bell yes # Request window attention on bell. # Makes the dock icon bounce on macOS or the taskbar flash on linux. window_alert_on_bell yes + +# Show a bell symbol on the tab if a bell occurs in one of the windows in the +# tab and the window is not the currently focused window +bell_on_tab yes # }}} diff --git a/kitty/tabs.py b/kitty/tabs.py index efa12ce4c..ca431bd6d 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -366,7 +366,7 @@ class TabBar: # {{{ before = s.cursor.x if self.leading_spaces: s.draw(' ' * self.leading_spaces) - if t.needs_attention: + if t.needs_attention and self.opts.bell_on_tab: s.cursor.fg = self.bell_fg s.draw('🔔 ') s.cursor.fg = fg