From 8551e51b6d2a9fd268590725807ad67ad2214f22 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 12 Oct 2014 15:16:26 +0400 Subject: [PATCH] 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. --- powerline/config_files/colorschemes/default.json | 1 - powerline/segments/common/players.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/powerline/config_files/colorschemes/default.json b/powerline/config_files/colorschemes/default.json index 7bf84501..2c138bd3 100644 --- a/powerline/config_files/colorschemes/default.json +++ b/powerline/config_files/colorschemes/default.json @@ -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"] }, diff --git a/powerline/segments/common/players.py b/powerline/segments/common/players.py index 57e5e403..45568728 100644 --- a/powerline/segments/common/players.py +++ b/powerline/segments/common/players.py @@ -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):