summaryrefslogtreecommitdiff
path: root/pywal/sequences.py
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2019-01-11 07:47:02 +0200
committerDylan Araps <dylan.araps@gmail.com>2019-01-11 07:47:02 +0200
commit614c1ab44a8527c83ba7777d2796e4d58093186a (patch)
tree684c71512d79bf2f724dcbb78977d232410af7dd /pywal/sequences.py
parent669836b9e98a60fd99772a681906aa23476fd185 (diff)
Aargs: Added --vte to fix artifacts in VTE terminals.
Diffstat (limited to 'pywal/sequences.py')
-rw-r--r--pywal/sequences.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/pywal/sequences.py b/pywal/sequences.py
index 18aa6eb..47acb34 100644
--- a/pywal/sequences.py
+++ b/pywal/sequences.py
@@ -35,7 +35,7 @@ def set_iterm_tab_color(color):
"\033]6;1;bg;blue;brightness;%s\a") % (*util.hex_to_rgb(color),)
-def create_sequences(colors):
+def create_sequences(colors, vte_fix=False):
"""Create the escape sequences."""
alpha = colors["alpha"]
@@ -54,18 +54,22 @@ def create_sequences(colors):
set_special(13, colors["special"]["foreground"], "l"),
set_special(17, colors["special"]["foreground"], "l"),
set_special(19, colors["special"]["background"], "l"),
- set_special(708, colors["special"]["background"], "l", alpha),
set_color(232, colors["special"]["background"]),
set_color(256, colors["special"]["foreground"])
])
+ if not vte_fix:
+ sequences.extend(
+ set_special(708, colors["special"]["background"], "l", alpha)
+ )
+
if OS == "Darwin":
sequences += set_iterm_tab_color(colors["special"]["background"])
return "".join(sequences)
-def send(colors, cache_dir=CACHE_DIR, to_send=True):
+def send(colors, cache_dir=CACHE_DIR, to_send=True, vte_fix=False):
"""Send colors to all open terminals."""
if OS == "Darwin":
tty_pattern = "/dev/ttys00[0-9]*"
@@ -73,7 +77,7 @@ def send(colors, cache_dir=CACHE_DIR, to_send=True):
else:
tty_pattern = "/dev/pts/[0-9]*"
- sequences = create_sequences(colors)
+ sequences = create_sequences(colors, vte_fix)
# Writing to "/dev/pts/[0-9] lets you send data to open terminals.
if to_send: