Add a new escape code to allow terminal programs to trigger desktop notifications

Fixes #1474
This commit is contained in:
Kovid Goyal
2020-08-21 20:20:02 +05:30
parent cd76d109f5
commit eca53bfab0
10 changed files with 389 additions and 14 deletions

View File

@@ -37,10 +37,14 @@ class Callbacks:
def use_utf8(self, on):
self.iutf8 = on
def desktop_notify(self, osc_code: int, raw_data: str) -> None:
self.notifications.append((osc_code, raw_data))
def clear(self):
self.wtcbuf = b''
self.iconbuf = self.titlebuf = self.colorbuf = self.ctbuf = ''
self.iutf8 = True
self.notifications = []
def filled_line_buf(ynum=5, xnum=5, cursor=Cursor()):