diff --git a/pywal/sequences.py b/pywal/sequences.py index b5bff82..7a67aec 100644 --- a/pywal/sequences.py +++ b/pywal/sequences.py @@ -83,7 +83,7 @@ def send(colors, cache_dir=CACHE_DIR, to_send=True, # Writing to "/dev/pts/[0-9] lets you send data to open terminals. if to_send: - ttys = [] + ttys = None if only_active: ttys = util.fetch_active_ttys() diff --git a/pywal/settings.py b/pywal/settings.py index cb32c42..e040087 100644 --- a/pywal/settings.py +++ b/pywal/settings.py @@ -13,7 +13,7 @@ import os import platform -__version__ = "3.3.1" +__version__ = "3.3.2" __cache_version__ = "1.1.0" diff --git a/pywal/util.py b/pywal/util.py index aac8c57..787494b 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -134,7 +134,7 @@ def save_file(data, export_file): logging.warning("Couldn't write to %s.", export_file) -def save_to_tty(data, tty_name, active_ttys=[]): +def save_to_tty(data, tty_name, active_ttys=None): """Write data to a tty.""" if active_ttys: if os.path.basename(tty_name) not in active_ttys: @@ -144,6 +144,8 @@ def save_to_tty(data, tty_name, active_ttys=[]): def fetch_active_ttys(): + """Fetches the active ttys as determined + by the `who` utility. On failure, we return None.""" try: out, err = subprocess.Popen( ["who"], stdout=subprocess.PIPE).communicate()