From 788533e5c20132c727e2f287dce6ada64ebd5872 Mon Sep 17 00:00:00 2001 From: Austin Schey Date: Sun, 3 Mar 2019 11:13:44 -0600 Subject: added features for saving user themes and loading random themes --- pywal/__main__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'pywal/__main__.py') 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(): -- cgit v1.2.3