Force update using USR1 signal
This commit is contained in:
parent
f8d035c079
commit
c77f3aa3bc
2 changed files with 10 additions and 1 deletions
|
@ -222,13 +222,14 @@ class i3(object):
|
|||
return blocks
|
||||
|
||||
# TODO: only updates full text, not the state!?
|
||||
# can this TODO be removed now? Will update the state if not redraw_only
|
||||
def update(self, affected_modules=None, redraw_only=False):
|
||||
now = time.time()
|
||||
for module in self.__modules:
|
||||
if affected_modules and not module.id in affected_modules:
|
||||
continue
|
||||
if not affected_modules and module.next_update:
|
||||
if now < module.next_update:
|
||||
if now < module.next_update and redraw_only:
|
||||
continue
|
||||
|
||||
if not redraw_only:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue