From b649563ebad5d7f915f038041d861d942d61a233 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 2 Apr 2018 07:15:29 +1000 Subject: [PATCH] general: Fixed invoking pywal from hotkey. Closes #219 --- pywal/__main__.py | 5 ++++- pywal/backends/colorthief.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pywal/__main__.py b/pywal/__main__.py index 04fbffc..fc341cf 100644 --- a/pywal/__main__.py +++ b/pywal/__main__.py @@ -160,7 +160,10 @@ def process_args(args): wallpaper.change(colors_plain["wallpaper"]) sequences.send(colors_plain, to_send=not args.s) - colors.palette() + + if sys.stdout.isatty(): + colors.palette() + export.every(colors_plain) if not args.e: diff --git a/pywal/backends/colorthief.py b/pywal/backends/colorthief.py index 7b2e2bc..bcb9e39 100644 --- a/pywal/backends/colorthief.py +++ b/pywal/backends/colorthief.py @@ -25,7 +25,7 @@ def gen_colors(img): if len(raw_colors) >= 8: break - elif i == 19: + elif i == 10: logging.error("ColorThief couldn't generate a suitable palette.") sys.exit(1)