mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-20 17:47:44 +02:00
general: Allow both light and dark themes.
This commit is contained in:
parent
929c0ee5b0
commit
0c9148aa96
@ -102,9 +102,10 @@ def get(img, cache_dir=CACHE_DIR,
|
|||||||
color_count=COLOR_COUNT, light=False, notify=False):
|
color_count=COLOR_COUNT, light=False, notify=False):
|
||||||
"""Get the colorscheme."""
|
"""Get the colorscheme."""
|
||||||
# home_dylan_img_jpg_1.2.2.json
|
# home_dylan_img_jpg_1.2.2.json
|
||||||
|
color_type = "light" if light else "dark"
|
||||||
cache_file = re.sub("[/|\\|.]", "_", img)
|
cache_file = re.sub("[/|\\|.]", "_", img)
|
||||||
cache_file = os.path.join(cache_dir, "schemes", cache_file + "_" +
|
cache_file = os.path.join(cache_dir, "schemes", "%s_%s_%s.json"
|
||||||
__version__ + ".json")
|
% (cache_file, color_type, __version__))
|
||||||
|
|
||||||
if os.path.isfile(cache_file):
|
if os.path.isfile(cache_file):
|
||||||
colors = file(cache_file)
|
colors = file(cache_file)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user