diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2018-04-02 07:15:29 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2018-04-02 07:15:29 +1000 |
| commit | b649563ebad5d7f915f038041d861d942d61a233 (patch) | |
| tree | d0444ce2d9f89fd0c7ba353cbe375ed0bf5b0942 /pywal | |
| parent | 086f4186481d7ec2d38cd13ba8983ba726fe6265 (diff) | |
general: Fixed invoking pywal from hotkey. Closes #219
Diffstat (limited to 'pywal')
| -rw-r--r-- | pywal/__main__.py | 5 | ||||
| -rw-r--r-- | 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) |
