[core/output] Add generic pango support

Allow any piece of a theme that specifies a set of attributes (default,
cycles, states, widgets) to use pango *instead* of the usual attributes.

If pango is present, this will have precedence.

A practical example of this can be found in the powerline-pango theme,
which is added solely for demonstration purposes.

fixes #531
This commit is contained in:
tobi-wan-kenobi 2020-04-04 14:37:19 +02:00
parent 89247d834b
commit b5c2ca6ccf
4 changed files with 118 additions and 6 deletions

View file

@ -44,6 +44,7 @@ class Theme(object):
('border-right', 0),
('padding', ''),
('prefix', ''), ('suffix', ''),
('pango', None),
]:
setattr(self, attr.replace('-', '_'), lambda widget=None, default=default, attr=attr: self.__get(widget, attr, default))