summaryrefslogtreecommitdiff
path: root/pywal/sequences.py
diff options
context:
space:
mode:
authorAmar1729 <amar.paul16@gmail.com>2018-03-20 20:19:27 -0400
committerAmar1729 <amar.paul16@gmail.com>2018-03-20 20:19:27 -0400
commit49922b77aa6ed2de637cc5d55a3518601b6d6a2c (patch)
treebf2c633e646dc727cc02cce54c712afc6aebeeb2 /pywal/sequences.py
parent6397473a65a8c0a50a4e6631127ea26dcb37fc83 (diff)
fixes #207 - save sequences file even with -s
Diffstat (limited to 'pywal/sequences.py')
-rw-r--r--pywal/sequences.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pywal/sequences.py b/pywal/sequences.py
index 1b2fce5..3b32af5 100644
--- a/pywal/sequences.py
+++ b/pywal/sequences.py
@@ -73,7 +73,7 @@ def create_sequences(colors):
return "".join(sequences)
-def send(colors, cache_dir=CACHE_DIR):
+def send(colors, cache_dir=CACHE_DIR, to_send=True):
"""Send colors to all open terminals."""
if OS == "Darwin":
tty_pattern = "/dev/ttys00[0-9]*"
@@ -84,8 +84,9 @@ def send(colors, cache_dir=CACHE_DIR):
sequences = create_sequences(colors)
# Writing to "/dev/pts/[0-9] lets you send data to open terminals.
- for term in glob.glob(tty_pattern):
- util.save_file(sequences, term)
+ if to_send:
+ for term in glob.glob(tty_pattern):
+ util.save_file(sequences, term)
util.save_file(sequences, os.path.join(cache_dir, "sequences"))
print("colors: Set terminal colors.")