last test
[rainbowstream.git] / rainbowstream / rainbow.py
index ab4c847a9e2cbdbed876ea4731a3d66840014792..6b88c501c8dcd109c7ac000516f62f6751c91c97 100644 (file)
@@ -780,7 +780,7 @@ def theme():
                     os.environ.get('USERPROFILE',
                         '')) + os.sep + '.rainbow_config.json'
                 if not os.path.exists(custom_path):
-                    line += light_magenta(' (create your own config at ~/.rainbow_config.json)')
+                    line += light_magenta(' (create your own config file at ~/.rainbow_config.json)')
                 else:
                     line += light_magenta(' (loaded)')
             else:
@@ -794,7 +794,6 @@ def theme():
         # Change theme
         try:
             # Load new config
-            c['theme'] = g['stuff']
             if g['stuff'] != 'custom':
                 new_config = 'rainbowstream/colorset/' + g['stuff'] + '.json'
             else:
@@ -808,13 +807,15 @@ def theme():
                     c[nc] = new_config[nc]
             # Update db and reset colors
             db.theme_update(g['stuff'])
+            c['theme'] = g['stuff']
+            notify_cycle()
             g['decorated_name'] = color_func(
                 c['DECORATED_NAME'])(
                 '[@' + g['original_name'] + ']: ')
             printNicely(green('Theme changed.'))
         except:
             if g['stuff'] == 'custom':
-                printNicely(red('Sorry you should create config file first!'))
+                printNicely(red('~/.rainbow_config.json is not exists!'))
             else:
                 printNicely(red('No such theme exists.'))