[modules/todo] Implement improvement from PR #598
This commit is contained in:
parent
8bb47c14aa
commit
206cff1fb5
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ import os.path
|
||||||
|
|
||||||
import core.module
|
import core.module
|
||||||
import core.widget
|
import core.widget
|
||||||
|
import core.input
|
||||||
|
|
||||||
class Module(core.module.Module):
|
class Module(core.module.Module):
|
||||||
def __init__(self, config):
|
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.__doc = os.path.expanduser(self.parameter('file', '~/Documents/todo.txt'))
|
||||||
self.__todos = self.count_items()
|
self.__todos = self.count_items()
|
||||||
|
core.input.register(self, button=core.input.LEFT_MOUSE, cmd='xdg-open {}'.format(self.__doc))
|
||||||
|
|
||||||
def output(self, widget):
|
def output(self, widget):
|
||||||
return str(self.__todos)
|
return str(self.__todos)
|
||||||
|
|
Loading…
Reference in a new issue