aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Araps <[email protected]>2017-08-25 19:48:19 +1000
committerDylan Araps <[email protected]>2017-08-25 19:48:19 +1000
commit3c7b0fd8409d41467b4591bd557f14d812f1de16 (patch)
treefa1beedb701f198db18073fa71fe375886e90fc8
parentOS: Added support for Windows (diff)
downloadpywal-3c7b0fd8409d41467b4591bd557f14d812f1de16.tar.xz
pywal-3c7b0fd8409d41467b4591bd557f14d812f1de16.zip
colors: Use separate command on Windows
-rw-r--r--pywal/colors.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pywal/colors.py b/pywal/colors.py
index dd190e9..f6f77bf 100644
--- a/pywal/colors.py
+++ b/pywal/colors.py
@@ -7,13 +7,18 @@ import shutil
import subprocess
import sys
-from .settings import CACHE_DIR, COLOR_COUNT
+from .settings import CACHE_DIR, COLOR_COUNT, OS
from . import util
def imagemagick(color_count, img):
"""Call Imagemagick to generate a scheme."""
- colors = subprocess.Popen(["magick", "convert", img, "-resize", "25%",
+ if OS == "Windows":
+ magick_command = ["magick", "convert"]
+ else:
+ magick_command = ["convert"]
+
+ colors = subprocess.Popen([*magick_command, img, "-resize", "25%",
"+dither", "-colors", str(color_count),
"-unique-colors", "txt:-"],
stdout=subprocess.PIPE)