From 206cff1fb5346031f32d386b213425917d4ae392 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Fri, 17 Apr 2020 12:53:46 +0200 Subject: [PATCH] [modules/todo] Implement improvement from PR #598 --- modules/contrib/todo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/contrib/todo.py b/modules/contrib/todo.py index 3e464dc..4965886 100644 --- a/modules/contrib/todo.py +++ b/modules/contrib/todo.py @@ -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)