mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-09 15:38:30 +01:00
args: -c now exits, colors: simplified colorz
This commit is contained in:
parent
bbd1bd3558
commit
f29164baf9
@ -116,6 +116,11 @@ def parse_args_exit(parser):
|
|||||||
reload.colors()
|
reload.colors()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
if args.c:
|
||||||
|
scheme_dir = os.path.join(CACHE_DIR, "schemes")
|
||||||
|
shutil.rmtree(scheme_dir, ignore_errors=True)
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
if not args.i and \
|
if not args.i and \
|
||||||
not args.theme and \
|
not args.theme and \
|
||||||
not args.R and \
|
not args.R and \
|
||||||
@ -141,10 +146,6 @@ def parse_args(parser):
|
|||||||
logging.getLogger().disabled = True
|
logging.getLogger().disabled = True
|
||||||
sys.stdout = sys.stderr = open(os.devnull, "w")
|
sys.stdout = sys.stderr = open(os.devnull, "w")
|
||||||
|
|
||||||
if args.c:
|
|
||||||
scheme_dir = os.path.join(CACHE_DIR, "schemes")
|
|
||||||
shutil.rmtree(scheme_dir, ignore_errors=True)
|
|
||||||
|
|
||||||
if args.a:
|
if args.a:
|
||||||
util.Color.alpha_num = args.a
|
util.Color.alpha_num = args.a
|
||||||
|
|
||||||
|
@ -24,9 +24,7 @@ def gen_colors(img):
|
|||||||
|
|
||||||
def adjust(cols, light):
|
def adjust(cols, light):
|
||||||
"""Create palette."""
|
"""Create palette."""
|
||||||
bg = util.blend_color("#555555", cols[1])
|
raw_colors = [cols[0], *cols, "#FFFFFF",
|
||||||
|
|
||||||
raw_colors = [bg, *cols, "#FFFFFF",
|
|
||||||
"#333333", *cols, "#FFFFFF"]
|
"#333333", *cols, "#FFFFFF"]
|
||||||
|
|
||||||
return colors.generic_adjust(raw_colors, light)
|
return colors.generic_adjust(raw_colors, light)
|
||||||
|
Loading…
Reference in New Issue
Block a user