aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Araps <[email protected]>2017-06-26 10:14:32 +1000
committerDylan Araps <[email protected]>2017-06-26 10:14:32 +1000
commitbd8ae8ffc801af78a3b5ee3c681f5755430388a5 (patch)
treecd300854d260db8782b4f49a7b7697e2f503ad8a
parentMerge pull request #7 from danielx/console-script (diff)
downloadpywal-bd8ae8ffc801af78a3b5ee3c681f5755430388a5.tar.xz
pywal-bd8ae8ffc801af78a3b5ee3c681f5755430388a5.zip
export: Fix bug with color66 appearing in export files. Closes #6
-rw-r--r--.gitignore1
-rwxr-xr-xpywal/__init__.py7
2 files changed, 7 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 5fe8891..1063b13 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
dist/*
pywal.egg-info/*
+*.pyc
diff --git a/pywal/__init__.py b/pywal/__init__.py
index 6cf07e5..c766af7 100755
--- a/pywal/__init__.py
+++ b/pywal/__init__.py
@@ -272,6 +272,11 @@ def set_special(index, color):
ColorType.xrdb.append(f"URxvt*cursorColor: {color}")
ColorType.xrdb.append(f"XTerm*cursorColor: {color}")
+ elif index == 66:
+ ColorType.xrdb.append(f"*.color{index}: {color}")
+ ColorType.xrdb.append(f"*color{index}: {color}")
+ ColorType.sequences.append(f"\\033]4;{index};{color}\\007")
+
def set_color(index, color):
"""Build the escape sequence we need for each color."""
@@ -319,7 +324,7 @@ def send_sequences(colors, vte):
[set_color(num, color) for num, color in enumerate(colors)]
# Set a blank color that isn"t affected by bold highlighting.
- set_color(66, colors[0])
+ set_special(66, colors[0])
# Make the terminal interpret escape sequences.
sequences = fix_escape("".join(ColorType.sequences))