from .db import *
db = RainbowDB()
-cur_theme = None
def check_theme():
"""
"""
exists = db.theme_query()
themes = [t.theme_name for t in exists]
- if cur_theme != themes[0]:
- cur_theme = themes[0]
+ if c['theme'] != themes[0]:
+ c['theme'] = themes[0]
# Determine path
- if cur_theme == 'user':
+ if c['theme'] == 'custom':
config = os.environ.get(
'HOME',
os.environ.get(
'USERPROFILE',
'')) + os.sep + '.rainbow_config.json'
else:
- config = 'rainbowstream/colorset/'+cur_theme+'.json'
+ config = 'rainbowstream/colorset/'+c['theme']+'.json'
# Load new config
data = load_config(config)
if data:
for topic in trends[:c['TREND_MAX']]:
name = topic['name']
url = topic['url']
- line = cycle_color(name) + ': ' + color_func(TREND['url'])(url)
+ line = cycle_color(name) + ': ' + color_func(c['TREND']['url'])(url)
printNicely(line)
printNicely('')