diff --git a/docs/changelog.rst b/docs/changelog.rst index 8f17106a9..f83a91e4d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -84,6 +84,11 @@ consumption to do the same tasks. Detailed list of changes ------------------------------------- +0.37.1 [future] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- Discard OSC 9 notifications that start with :code:`4;` because some misguided software is using it for "progress reporting" (:iss:`8011`) + 0.37.0 [2024-10-30] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/window.py b/kitty/window.py index d0b130bdf..005dffd73 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -1095,6 +1095,13 @@ def desktop_notify(self, osc_code: int, raw_datab: memoryview) -> None: log_error(f'Ignoring unknown OSC 777: {raw_data}') return # unknown OSC 777 raw_data = raw_data[len('notify;'):] + if osc_code == 9 and raw_data.startswith('4;'): + # This is probably the Windows Terminal "progress reporting" conflicting + # implementation which sadly some thoughtless people have + # implemented in unix CLI programs. So ignore it rather than + # spamming the user with continuous notifications. See for example: + # https://github.com/kovidgoyal/kitty/issues/8011 + return get_boss().notification_manager.handle_notification_cmd(self.id, osc_code, raw_data) def on_mouse_event(self, event: dict[str, Any]) -> bool: