From 4daae88a7c9ad1fd38b6e3c7da31bd2d55fb55f8 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Fri, 1 May 2020 15:17:55 +0200 Subject: [PATCH] [core] Add right-to-left output --- bumblebee-status | 4 ++++ core/config.py | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/bumblebee-status b/bumblebee-status index 460df0e..c516fdd 100755 --- a/bumblebee-status +++ b/bumblebee-status @@ -68,6 +68,10 @@ def main(): for module in config.modules(): modules.append(core.module.load(module, config, theme)) + + if config.reverse(): + modules.reverse() + output.modules(modules) core.event.trigger('start') while True: diff --git a/core/config.py b/core/config.py index a9a684c..f1d48cb 100644 --- a/core/config.py +++ b/core/config.py @@ -27,6 +27,8 @@ class Config(util.store.Store): parser.add_argument('-d', '--debug', action='store_true', help='Add debug fields to i3 output') parser.add_argument('-f', '--logfile', help='destination for the debug log file, if -d|--debug is specified; defaults to stderr') + parser.add_argument('-r', '--right-to-left', action='store_true', help='Draw widgets from right to left, rather than left to right (which is the default)') + self.__args = parser.parse_args(args) parameters = [ item for sub in self.__args.parameters for item in sub ] @@ -46,6 +48,9 @@ class Config(util.store.Store): def debug(self): return self.__args.debug + def reverse(self): + return self.__args.right_to_left + def logfile(self): return self.__args.logfile