Commit 44424a42f940c0ed0a8fc5223670a099e5115e9d Parent: dbda507e9faba5661419f2faebb37c7a182e10a6 Author: mcol <mcol@posteo.net> Date: 2020-01-25 17:43:45 +0000 Committer: mcol <mcol@posteo.net> Committed: 2020-01-25 17:43:45 +0000 Implement replace_id on Notifier instances
qtools/__init__.py Modified
@@ -7,6 +7,7 @@ gi.require_version('Notify', '0.7') from gi.repository import Notify +from random import randint from xcffib.xproto import StackMode from libqtile import configurable, pangocffi, window @@ -37,6 +38,7 @@ config.get('summary', 'Notifier'), '' ) self.timeout = config.get('timeout', -1) + self.id = randint(10, 100) def __getattr__(self, name): """ @@ -60,6 +62,8 @@ if not isinstance(body, str): body = str(body) self.notifier.update(self.summary, body) + if hasattr(self, 'id'): + self.notifier.set_property('id', self.id) self.notifier.show() def hide(self): @@ -130,6 +134,8 @@ self.y = self.win.y self.width = self.win.width self.height = self.win.height + if not self.border_width: + self.border = None def _handle_Expose(self, e): pass