mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-21 01:57:55 +02:00
Make wal -R understand the -l flag, add -d flag
https://github.com/dylanaraps/pywal/issues/441
This commit is contained in:
parent
70c45f580e
commit
1bd5542beb
@ -76,6 +76,9 @@ def get_args():
|
||||
arg.add_argument("-l", action="store_true",
|
||||
help="Generate a light colorscheme.")
|
||||
|
||||
arg.add_argument("-d", action="store_true",
|
||||
help="Generate a dark colorscheme. Default.")
|
||||
|
||||
arg.add_argument("-n", action="store_true",
|
||||
help="Skip setting the wallpaper.")
|
||||
|
||||
@ -175,6 +178,17 @@ def parse_args(parser):
|
||||
if args.R:
|
||||
colors_plain = theme.file(os.path.join(CACHE_DIR, "colors.json"))
|
||||
|
||||
if args.l:
|
||||
f = open(os.path.join(CACHE_DIR, "wal"))
|
||||
cached_wallpaper = f.read()
|
||||
colors_plain = colors.get(cached_wallpaper, True, args.backend,
|
||||
sat=args.saturate)
|
||||
elif args.d:
|
||||
f = open(os.path.join(CACHE_DIR, "wal"))
|
||||
cached_wallpaper = f.read()
|
||||
colors_plain = colors.get(cached_wallpaper, False, args.backend,
|
||||
sat=args.saturate)
|
||||
|
||||
if args.b:
|
||||
args.b = "#%s" % (args.b.strip("#"))
|
||||
colors_plain["special"]["background"] = args.b
|
||||
|
Loading…
x
Reference in New Issue
Block a user