Rename highlight groups
This commit is contained in:
parent
f233c1f77e
commit
cdb030ec03
|
@ -28,7 +28,8 @@
|
|||
"battery_gradient": { "fg": "white_red", "bg": "gray0", "attr": [] },
|
||||
"battery_full": { "fg": "red", "bg": "gray0", "attr": [] },
|
||||
"battery_empty": { "fg": "white", "bg": "gray0", "attr": [] },
|
||||
"now_playing": { "fg": "gray10", "bg": "black", "attr": [] },
|
||||
"now_playing": "player",
|
||||
"player": { "fg": "gray10", "bg": "black", "attr": [] },
|
||||
"user": { "fg": "white", "bg": "darkblue", "attr": ["bold"] },
|
||||
"superuser": { "fg": "white", "bg": "brightred", "attr": ["bold"] },
|
||||
"branch": { "fg": "gray9", "bg": "gray2", "attr": [] },
|
||||
|
|
|
@ -48,7 +48,10 @@ class PlayerSegment(Segment):
|
|||
return None
|
||||
stats.update(func_stats)
|
||||
stats['state_symbol'] = state_symbols.get(stats['state'])
|
||||
return format.format(**stats)
|
||||
return [{
|
||||
'contents': format.format(**stats),
|
||||
'highlight_group': ['player_' + (stats['state'] or 'fallback'), 'player', 'now_playing'],
|
||||
}]
|
||||
|
||||
def argspecobjs(self):
|
||||
for ret in super(PlayerSegment, self).argspecobjs():
|
||||
|
@ -71,6 +74,8 @@ This player segment should be added like this:
|
|||
|
||||
(with additional ``"args": {{…}}`` if needed).
|
||||
|
||||
Highlight groups used: ``player_fallback`` or ``player``, ``player_play`` or ``player``, ``player_pause`` or ``player``, ``player_stop`` or ``player``.
|
||||
|
||||
:param str format:
|
||||
Format used for displaying data from player. Should be a str.format-like
|
||||
string with the following keyword parameters:
|
||||
|
|
Loading…
Reference in New Issue