From 8a604e4f24ebfe053b3b65483b998e2a57d51557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Soykan=20Ert=C3=BCrk?= Date: Thu, 16 Apr 2020 22:29:18 +0300 Subject: [PATCH] left mouse click to open todo list --- bumblebee/modules/todo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bumblebee/modules/todo.py b/bumblebee/modules/todo.py index 04cd256..b26d7c7 100644 --- a/bumblebee/modules/todo.py +++ b/bumblebee/modules/todo.py @@ -21,11 +21,12 @@ class Module(bumblebee.engine.Module): ) self._doc = os.path.expanduser(self.parameter("file", "~/Documents/todo.txt")) self._todos = self.count_items() + engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE, cmd="xdg-open {0}".format(self._doc)) def output(self, widget): - self._todos = self.count_items() - return str(self._todos) + self._todos = self.count_items() + return str(self._todos) def state(self, widgets):