a8a6c9bba2
This is going to be a bit more comprehensive than anticipated. In order to cleanly refactor the core and the engine, basically start from scratch with the implementation. Goals: * Test coverage * Maintain backwards compatibility with module interface as much as possible (but still make modules easier to code) * Simplicity see #23
19 lines
578 B
Python
19 lines
578 B
Python
import argparse
|
|
|
|
MODULE_HELP = ""
|
|
|
|
class Config(object):
|
|
def __init__(self, args = []):
|
|
parser = self._create_parser()
|
|
self._args = parser.parse_args(args)
|
|
|
|
def modules(self):
|
|
return map(lambda x: { "name": x, "module": x }, self._args.modules)
|
|
|
|
def _create_parser(self):
|
|
parser = argparse.ArgumentParser(description="display system data in the i3bar")
|
|
parser.add_argument("-m", "--modules", nargs="+", default = [],
|
|
help = MODULE_HELP)
|
|
return parser
|
|
|
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|