e895400589
Add a plugin that displays the remaining battery power in %. This also introduces the concept of arguments that can be passed to a module during startup by delimiting the module name with ":", for example: -m battery:BAT1 to query the BAT1 device. Note that this works to an arbitray length, i.e. if a module accepts 3 parameters: -m <modulename>:<A>:<B>:<C> The module gets the arguments as list.
9 lines
192 B
Python
9 lines
192 B
Python
|
|
class Module(object):
|
|
def __init__(self, theme, args):
|
|
self._theme = theme
|
|
|
|
def theme(self):
|
|
return self._theme
|
|
|
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|