reload: Fix error with XQuartz on macOS. Closes #86

This commit is contained in:
dylan araps 2017-08-16 15:53:22 +10:00
parent 270de570dd
commit dad1736fce

View File

@ -7,7 +7,7 @@ import shutil
import subprocess
import sys
from .settings import CACHE_DIR, HOME, MODULE_DIR
from .settings import CACHE_DIR, HOME, MODULE_DIR, OS
from . import util
@ -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"):
if shutil.which("xrdb") or OS != "Darwin":
subprocess.Popen(["xrdb", "-merge", xrdb_file],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL).wait()