[modules/todo] Implement improvement from PR #598

This commit is contained in:
tobi-wan-kenobi 2020-04-17 12:53:46 +02:00
parent 8bb47c14aa
commit 206cff1fb5

View file

@ -10,6 +10,7 @@ import os.path
import core.module
import core.widget
import core.input
class Module(core.module.Module):
def __init__(self, config):
@ -17,7 +18,7 @@ class Module(core.module.Module):
self.__doc = os.path.expanduser(self.parameter('file', '~/Documents/todo.txt'))
self.__todos = self.count_items()
core.input.register(self, button=core.input.LEFT_MOUSE, cmd='xdg-open {}'.format(self.__doc))
def output(self, widget):
return str(self.__todos)