[help] Add theme and module listing
Re-enable the possibility to list available themes and modules. fixes #29
This commit is contained in:
parent
71cc0c216f
commit
31f9154be2
5 changed files with 45 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
"""Theme support"""
|
||||
|
||||
import os
|
||||
import glob
|
||||
import copy
|
||||
import json
|
||||
|
||||
|
@ -12,6 +13,14 @@ def theme_path():
|
|||
"""Return the path of the theme directory"""
|
||||
return os.path.dirname("{}/../themes/".format(os.path.dirname(os.path.realpath(__file__))))
|
||||
|
||||
def themes():
|
||||
result = []
|
||||
|
||||
for filename in glob.iglob("{}/*.json".format(theme_path())):
|
||||
if "test" not in filename:
|
||||
result.append(os.path.basename(filename).replace(".json", ""))
|
||||
return result
|
||||
|
||||
class Theme(object):
|
||||
"""Represents a collection of icons and colors"""
|
||||
def __init__(self, name):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue