Prioritize now_playing highlight group, but remove it from colorscheme

Reasoning for first: backwards compatibility. If user defined `now_playing`
highlight group it is what should be used.

Reasoning for second: it is useless there. If user has defined its own group its
effect will not be affected, if he has not then there is nothing to talk about.
This commit is contained in:
ZyX 2014-10-12 15:16:26 +04:00
parent dad1197284
commit 8551e51b6d
2 changed files with 1 additions and 2 deletions

View File

@ -28,7 +28,6 @@
"battery_gradient": { "fg": "white_red", "bg": "gray0", "attr": [] },
"battery_full": { "fg": "red", "bg": "gray0", "attr": [] },
"battery_empty": { "fg": "white", "bg": "gray0", "attr": [] },
"now_playing": "player",
"player": { "fg": "gray10", "bg": "black", "attr": [] },
"user": { "fg": "white", "bg": "darkblue", "attr": ["bold"] },
"superuser": { "fg": "white", "bg": "brightred", "attr": ["bold"] },

View File

@ -50,7 +50,7 @@ class PlayerSegment(Segment):
stats['state_symbol'] = state_symbols.get(stats['state'])
return [{
'contents': format.format(**stats),
'highlight_group': ['player_' + (stats['state'] or 'fallback'), 'player', 'now_playing'],
'highlight_group': ['now_playing', 'player_' + (stats['state'] or 'fallback'), 'player'],
}]
def argspecobjs(self):