From bb03272e3286e31f09e30a72159d3b683fefb7fb Mon Sep 17 00:00:00 2001 From: Vu Nhat Minh Date: Thu, 3 Jul 2014 17:45:18 +0900 Subject: [PATCH] theme chosen --- rainbowstream/rainbow.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index d31533b..84aff93 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -794,14 +794,20 @@ def theme(): # Change theme try: # Load new config - new_config = 'rainbowstream/colorset/' + g['stuff'] + '.json' + c['theme'] = g['stuff'] + if g['stuff'] != 'custom': + new_config = 'rainbowstream/colorset/' + g['stuff'] + '.json' + else: + new_config = os.environ.get( + 'HOME',os.environ.get( + 'USERPROFILE', + '')) + os.sep + '.rainbow_config.json' new_config = load_config(new_config) if new_config: for nc in new_config: c[nc] = new_config[nc] # Update db and reset colors db.theme_update(g['stuff']) - cyc = init_cycle() g['decorated_name'] = color_func( c['DECORATED_NAME'])( '[@' + g['original_name'] + ']: ') -- 2.25.1