mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-07 14:39:46 +01:00
OS: Added support for Windows
This commit is contained in:
parent
93258bdcd8
commit
f50cac635e
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ subprocess
|
||||
re
|
||||
build/*
|
||||
.coverage
|
||||
.vscode/*
|
@ -13,7 +13,7 @@ from . import util
|
||||
|
||||
def imagemagick(color_count, img):
|
||||
"""Call Imagemagick to generate a scheme."""
|
||||
colors = subprocess.Popen(["convert", img, "-resize", "25%",
|
||||
colors = subprocess.Popen(["magick", "convert", img, "-resize", "25%",
|
||||
"+dither", "-colors", str(color_count),
|
||||
"-unique-colors", "txt:-"],
|
||||
stdout=subprocess.PIPE)
|
||||
|
@ -15,7 +15,7 @@ def xrdb(xrdb_file=None):
|
||||
"""Merge the colors into the X db so new terminals use them."""
|
||||
xrdb_file = xrdb_file or os.path.join(CACHE_DIR, "colors.Xresources")
|
||||
|
||||
if shutil.which("xrdb") or OS != "Darwin":
|
||||
if shutil.which("xrdb") and OS != "Darwin":
|
||||
subprocess.Popen(["xrdb", "-merge", xrdb_file],
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL).wait()
|
||||
|
@ -16,7 +16,7 @@ import platform
|
||||
__version__ = "0.6.6"
|
||||
|
||||
|
||||
HOME = os.environ["HOME"]
|
||||
HOME = os.getenv("HOME", os.getenv("USERPROFILE"))
|
||||
CACHE_DIR = os.path.join(HOME, ".cache/wal/")
|
||||
MODULE_DIR = os.path.dirname(__file__)
|
||||
COLOR_COUNT = 16
|
||||
|
@ -113,8 +113,7 @@ def disown(cmd):
|
||||
disown it and hide it's output."""
|
||||
subprocess.Popen(["nohup", *cmd],
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL,
|
||||
preexec_fn=os.setpgrp)
|
||||
stderr=subprocess.DEVNULL)
|
||||
|
||||
|
||||
def msg(input_msg, notify):
|
||||
|
Loading…
Reference in New Issue
Block a user