[core/output] Add specific --markup parameter
To allow a user to specify a custom markup string, add a parameter "--markup" to bumblebee-status. fixes #493
This commit is contained in:
parent
f80fcfa60c
commit
43aaa28256
2 changed files with 5 additions and 1 deletions
|
@ -51,6 +51,7 @@ def create_parser():
|
||||||
parser.add_argument("-m", "--modules", nargs="+", action='append', default=[],
|
parser.add_argument("-m", "--modules", nargs="+", action='append', default=[],
|
||||||
help=MODULE_HELP)
|
help=MODULE_HELP)
|
||||||
parser.add_argument("-t", "--theme", default="default", help=THEME_HELP)
|
parser.add_argument("-t", "--theme", default="default", help=THEME_HELP)
|
||||||
|
parser.add_argument("--markup", default="none", help="Specify the markup type of the output")
|
||||||
parser.add_argument("-p", "--parameters", nargs="+", action='append', default=[],
|
parser.add_argument("-p", "--parameters", nargs="+", action='append', default=[],
|
||||||
help=PARAMETER_HELP)
|
help=PARAMETER_HELP)
|
||||||
parser.add_argument("-l", "--list", choices=["modules", "themes"], action=print_usage,
|
parser.add_argument("-l", "--list", choices=["modules", "themes"], action=print_usage,
|
||||||
|
@ -115,4 +116,7 @@ class Config(bumblebee.store.Store):
|
||||||
def autohide(self):
|
def autohide(self):
|
||||||
return self._args.autohide
|
return self._args.autohide
|
||||||
|
|
||||||
|
def markup(self):
|
||||||
|
return self._args.markup
|
||||||
|
|
||||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||||
|
|
|
@ -164,7 +164,7 @@ class I3BarOutput(object):
|
||||||
"align": self._theme.align(widget),
|
"align": self._theme.align(widget),
|
||||||
"instance": widget.id,
|
"instance": widget.id,
|
||||||
"name": module.id,
|
"name": module.id,
|
||||||
"markup": self._config.get("output.markup", "none"),
|
"markup": "none" if not self._config else self._config.markup(),
|
||||||
})
|
})
|
||||||
|
|
||||||
def begin(self):
|
def begin(self):
|
||||||
|
|
Loading…
Reference in a new issue