left mouse click to open todo list

This commit is contained in:
Soykan Ertürk 2020-04-16 22:29:18 +03:00 committed by GitHub
parent 77287408e1
commit 8a604e4f24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,11 +21,12 @@ class Module(bumblebee.engine.Module):
) )
self._doc = os.path.expanduser(self.parameter("file", "~/Documents/todo.txt")) self._doc = os.path.expanduser(self.parameter("file", "~/Documents/todo.txt"))
self._todos = self.count_items() 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): def output(self, widget):
self._todos = self.count_items() self._todos = self.count_items()
return str(self._todos) return str(self._todos)
def state(self, widgets): def state(self, widgets):