[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:
Tobias Witek 2019-12-24 13:54:41 +01:00
parent f80fcfa60c
commit 43aaa28256
2 changed files with 5 additions and 1 deletions

View file

@ -51,6 +51,7 @@ def create_parser():
parser.add_argument("-m", "--modules", nargs="+", action='append', default=[],
help=MODULE_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=[],
help=PARAMETER_HELP)
parser.add_argument("-l", "--list", choices=["modules", "themes"], action=print_usage,
@ -115,4 +116,7 @@ class Config(bumblebee.store.Store):
def autohide(self):
return self._args.autohide
def markup(self):
return self._args.markup
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4

View file

@ -164,7 +164,7 @@ class I3BarOutput(object):
"align": self._theme.align(widget),
"instance": widget.id,
"name": module.id,
"markup": self._config.get("output.markup", "none"),
"markup": "none" if not self._config else self._config.markup(),
})
def begin(self):