summaryrefslogtreecommitdiff
path: root/pywal/sequences.py
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2017-08-09 11:22:51 +1000
committerDylan Araps <dylan.araps@gmail.com>2017-08-09 11:22:51 +1000
commitd98be353ecd5deff97804312ec798fb227adfbc1 (patch)
tree84491474f6e0648dea3a7689f0626a4809492007 /pywal/sequences.py
parentd9a0865277dfdfe7951b9b429d5af1f2be27d66c (diff)
general: Make pywal compatible with python 3.5
Diffstat (limited to 'pywal/sequences.py')
-rw-r--r--pywal/sequences.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/pywal/sequences.py b/pywal/sequences.py
index b94bd93..87339d9 100644
--- a/pywal/sequences.py
+++ b/pywal/sequences.py
@@ -12,30 +12,30 @@ def set_special(index, color, iterm_name="h"):
alpha = util.Color.alpha_num
if OS == "Darwin":
- return f"\033]P{iterm_name}{color.strip('#')}\033\\"
+ return "\033[P%s%s\033\\" % (iterm_name, color.strip("#"))
if index in [11, 708] and alpha != 100:
- return f"\033]{index};[{alpha}]{color}\007"
+ return "\033]%s;[%s]%s\007" % (index, alpha, color)
- return f"\033]{index};{color}\007"
+ return "\033]%s;%s\007" % (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 "\033]P%x%s\033\\" % (index, color.strip("#"))
- return f"\033]4;{index};{color}\007"
+ return "\033]4;%s;%s\007" % (index, color)
def set_iterm_tab_color(color):
"""Set iTerm2 tab/window color"""
red, green, blue = util.hex_to_rgb(color)
- return [
- f"\033]6;1;bg;red;brightness;{red}\a",
- f"\033]6;1;bg;green;brightness;{green}\a",
- f"\033]6;1;bg;blue;brightness;{blue}\a",
- ]
+ return """
+ \033]6;1;bg;red;brightness;%s\a
+ \033]6;1;bg;green;brightness;%s\a
+ \033]6;1;bg;blue;brightness;%s\a
+ """ % (red, green, blue)
def create_sequences(colors, vte):