bumblebee-status/modules/core/kernel.py
tobi-wan-kenobi bd7ff3c8f1 [core] Allow modules to specify default update interval
Expanding on the implementation in d582016, add a decorator
`core.module.every()` that allows a module to specify how often to
update the module's state.

This can still be overridden using the CLI parameter `interval`.
2020-03-29 14:32:47 +02:00

18 lines
432 B
Python

# pylint: disable=C0111,R0903
"""Shows Linux kernel version information"""
import platform
import core.module
import core.widget
class Module(core.module.Module):
@core.module.every(minutes=60)
def __init__(self, config=None):
super().__init__(config, core.widget.Widget(self.full_text))
def full_text(self, widgets):
return platform.release()
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4