aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Araps <[email protected]>2018-02-03 10:00:04 +1100
committerDylan Araps <[email protected]>2018-02-03 10:00:04 +1100
commit0c9148aa96c3019ce6d849f194c039a4842615d8 (patch)
tree2b91352d2f79c1ecb20c43b365b65adf09651506
parentcolors: Add light theme support. (diff)
downloadpywal-0c9148aa96c3019ce6d849f194c039a4842615d8.tar.xz
pywal-0c9148aa96c3019ce6d849f194c039a4842615d8.zip
general: Allow both light and dark themes.
-rw-r--r--pywal/colors.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pywal/colors.py b/pywal/colors.py
index 718d540..b93831d 100644
--- a/pywal/colors.py
+++ b/pywal/colors.py
@@ -102,9 +102,10 @@ def get(img, cache_dir=CACHE_DIR,
color_count=COLOR_COUNT, light=False, notify=False):
"""Get the colorscheme."""
# home_dylan_img_jpg_1.2.2.json
+ color_type = "light" if light else "dark"
cache_file = re.sub("[/|\\|.]", "_", img)
- cache_file = os.path.join(cache_dir, "schemes", cache_file + "_" +
- __version__ + ".json")
+ cache_file = os.path.join(cache_dir, "schemes", "%s_%s_%s.json"
+ % (cache_file, color_type, __version__))
if os.path.isfile(cache_file):
colors = file(cache_file)