diff options
| -rw-r--r-- | pywal/sequences.py | 5 | ||||
| -rw-r--r-- | pywal/settings.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/pywal/sequences.py b/pywal/sequences.py index 4e1457d..030f030 100644 --- a/pywal/sequences.py +++ b/pywal/sequences.py @@ -3,7 +3,7 @@ Send sequences to all open terminals. """ import os -from .settings import CACHE_DIR +from .settings import CACHE_DIR, OS from . import util @@ -19,6 +19,9 @@ def set_special(index, color): def set_color(index, color): """Convert a hex color to a text color sequence.""" + if OS == "Darwin": + return f"\033]P{index:x}{color.strip('#')}\033\\" + return f"\033]4;{index};{color}\007" diff --git a/pywal/settings.py b/pywal/settings.py index 812c050..a58930a 100644 --- a/pywal/settings.py +++ b/pywal/settings.py @@ -10,6 +10,7 @@ Created by Dylan Araps. """ import pathlib +import platform __version__ = "0.5.7" @@ -19,3 +20,4 @@ HOME = pathlib.Path.home() CACHE_DIR = HOME / ".cache/wal/" MODULE_DIR = pathlib.Path(__file__).parent COLOR_COUNT = 16 +OS = platform.uname()[0] |
