[core] Add right-to-left output
This commit is contained in:
parent
f087dbcee4
commit
4daae88a7c
2 changed files with 9 additions and 0 deletions
|
@ -68,6 +68,10 @@ def main():
|
||||||
|
|
||||||
for module in config.modules():
|
for module in config.modules():
|
||||||
modules.append(core.module.load(module, config, theme))
|
modules.append(core.module.load(module, config, theme))
|
||||||
|
|
||||||
|
if config.reverse():
|
||||||
|
modules.reverse()
|
||||||
|
|
||||||
output.modules(modules)
|
output.modules(modules)
|
||||||
core.event.trigger('start')
|
core.event.trigger('start')
|
||||||
while True:
|
while True:
|
||||||
|
|
|
@ -27,6 +27,8 @@ class Config(util.store.Store):
|
||||||
parser.add_argument('-d', '--debug', action='store_true',
|
parser.add_argument('-d', '--debug', action='store_true',
|
||||||
help='Add debug fields to i3 output')
|
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('-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)
|
self.__args = parser.parse_args(args)
|
||||||
|
|
||||||
parameters = [ item for sub in self.__args.parameters for item in sub ]
|
parameters = [ item for sub in self.__args.parameters for item in sub ]
|
||||||
|
@ -46,6 +48,9 @@ class Config(util.store.Store):
|
||||||
def debug(self):
|
def debug(self):
|
||||||
return self.__args.debug
|
return self.__args.debug
|
||||||
|
|
||||||
|
def reverse(self):
|
||||||
|
return self.__args.right_to_left
|
||||||
|
|
||||||
def logfile(self):
|
def logfile(self):
|
||||||
return self.__args.logfile
|
return self.__args.logfile
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue