reduce update interval
This commit is contained in:
parent
2a38b4098d
commit
45660bbc08
1 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ import util.cli
|
||||||
|
|
||||||
|
|
||||||
class Module(core.module.Module):
|
class Module(core.module.Module):
|
||||||
# @core.decorators.every(minutes=1)
|
@core.decorators.every(minutes=5)
|
||||||
def __init__(self, config, theme):
|
def __init__(self, config, theme):
|
||||||
super().__init__(config, theme, core.widget.Widget(self.text))
|
super().__init__(config, theme, core.widget.Widget(self.text))
|
||||||
|
|
||||||
|
@ -36,8 +36,6 @@ class Module(core.module.Module):
|
||||||
core.input.register(self, button=core.input.WHEEL_UP, cmd=self.change_project)
|
core.input.register(self, button=core.input.WHEEL_UP, cmd=self.change_project)
|
||||||
core.input.register(self, button=core.input.WHEEL_DOWN, cmd=self.change_project)
|
core.input.register(self, button=core.input.WHEEL_DOWN, cmd=self.change_project)
|
||||||
|
|
||||||
# def get_list(self):
|
|
||||||
|
|
||||||
def toggle(self, widget):
|
def toggle(self, widget):
|
||||||
# on click, starts the timer if the project is slected
|
# on click, starts the timer if the project is slected
|
||||||
if self.__project != "Select Project":
|
if self.__project != "Select Project":
|
||||||
|
@ -82,6 +80,8 @@ class Module(core.module.Module):
|
||||||
# updates the list of current projects and creats a key dictionary
|
# updates the list of current projects and creats a key dictionary
|
||||||
self.__project_list = util.cli.execute("watson projects").split()
|
self.__project_list = util.cli.execute("watson projects").split()
|
||||||
for n in range(len(self.__project_list)):
|
for n in range(len(self.__project_list)):
|
||||||
|
if n == 0 and self.__project == "Select Project":
|
||||||
|
self.__project = self.__project_list[n]
|
||||||
self.__project_key[self.__project_list[n]] = n
|
self.__project_key[self.__project_list[n]] = n
|
||||||
|
|
||||||
def state(self, widget):
|
def state(self, widget):
|
||||||
|
|
Loading…
Reference in a new issue