summaryrefslogtreecommitdiff
path: root/pywal/__main__.py
diff options
context:
space:
mode:
authorAustin Schey <aschey13@gmail.com>2019-03-03 11:13:44 -0600
committerAustin Schey <aschey13@gmail.com>2019-03-05 23:24:38 -0600
commit788533e5c20132c727e2f287dce6ada64ebd5872 (patch)
treea74ce02b5b9dda9839373756798917566a63a755 /pywal/__main__.py
parent53740712a6a7693b82fb6f24810716ef54a6831f (diff)
added features for saving user themes and loading random themes
Diffstat (limited to 'pywal/__main__.py')
-rw-r--r--pywal/__main__.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/pywal/__main__.py b/pywal/__main__.py
index 2e50ca9..15b7228 100644
--- a/pywal/__main__.py
+++ b/pywal/__main__.py
@@ -45,7 +45,7 @@ def get_args():
arg.add_argument("--theme", "-f", metavar="/path/to/file or theme_name",
help="Which colorscheme file to use. \
- Use 'wal --theme' to list builtin themes.",
+ Use 'wal --theme' to list builtin and user themes.",
const="list_themes", nargs="?")
arg.add_argument("--iterative", action="store_true",
@@ -77,6 +77,11 @@ def get_args():
arg.add_argument("-o", metavar="\"script_name\"", action="append",
help="External script to run after \"wal\".")
+ arg.add_argument("-p", metavar="\"theme_name\"",
+ help="permanently save theme to "
+ "$XDG_CONFIG_HOME/wal/colorschemes with "
+ "the specified name")
+
arg.add_argument("-q", action="store_true",
help="Quiet mode, don\'t print anything.")
@@ -177,6 +182,9 @@ def parse_args(parser):
if not args.n:
wallpaper.change(colors_plain["wallpaper"])
+ if args.p:
+ theme.save(colors_plain, args.p, args.l)
+
sequences.send(colors_plain, to_send=not args.s, vte_fix=args.vte)
if sys.stdout.isatty():