From 43aaa2825675e7d45beaf350ec429b3853b53373 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Tue, 24 Dec 2019 13:54:41 +0100 Subject: [PATCH] [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 --- bumblebee/config.py | 4 ++++ bumblebee/output.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bumblebee/config.py b/bumblebee/config.py index c983ecc..4883fe1 100644 --- a/bumblebee/config.py +++ b/bumblebee/config.py @@ -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 diff --git a/bumblebee/output.py b/bumblebee/output.py index df69e3a..b5e2b26 100644 --- a/bumblebee/output.py +++ b/bumblebee/output.py @@ -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):