summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2018-06-26 07:24:02 +1000
committerGitHub <noreply@github.com>2018-06-26 07:24:02 +1000
commita87145e791135d4bac985e2641fa9633e5c66173 (patch)
treeed9b5aeed266d67bf1b8e9e0567f2462052493bf
parentd49caeebfb9d76a4baa653cc9a8d143005d44688 (diff)
parentf55d00920dbd5fe2e86a0e6f4627c67beafadd85 (diff)
Merge pull request #268 from D-Vaillant/master
Implemented palette preview.
-rw-r--r--pywal/__main__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pywal/__main__.py b/pywal/__main__.py
index edaa1c2..b3812b4 100644
--- a/pywal/__main__.py
+++ b/pywal/__main__.py
@@ -56,6 +56,9 @@ def get_args():
arg.add_argument("--saturate", metavar="0.0-1.0",
help="Set the color saturation.")
+ arg.add_argument("--preview", action="store_true",
+ help="Print the current color palette.")
+
arg.add_argument("-c", action="store_true",
help="Delete all cached colorschemes.")
@@ -110,6 +113,11 @@ def parse_args_exit(parser):
if args.v:
parser.exit(0, "wal %s\n" % __version__)
+ if args.preview:
+ print("Current colorscheme:", sep='')
+ colors.palette()
+ sys.exit(0)
+
if args.i and args.theme:
parser.error("Conflicting arguments -i and -f.")