My collection of plugins for the Qtile window manager.
git clone https://mcol.xyz/code/qtools
Log | Files | Refs | README

commit 44424a42f940c0ed0a8fc5223670a099e5115e9d
parent dbda507e9faba5661419f2faebb37c7a182e10a6
Author: mcol <mcol@posteo.net>
Date:   Sat, 25 Jan 2020 17:43:45 +0000

Implement replace_id on Notifier instances

Diffstat:
Mqtools/__init__.py | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/qtools/__init__.py b/qtools/__init__.py @@ -7,6 +7,7 @@ import gi 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 @@ class Notifier(configurable.Configurable): config.get('summary', 'Notifier'), '' ) self.timeout = config.get('timeout', -1) + self.id = randint(10, 100) def __getattr__(self, name): """ @@ -60,6 +62,8 @@ class Notifier(configurable.Configurable): 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 @@ class Popup(configurable.Configurable): 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