mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-29 11:24:03 +01:00
fixes #207 - save sequences file even with -s
This commit is contained in:
parent
6397473a65
commit
49922b77aa
@ -137,8 +137,7 @@ def process_args(args):
|
|||||||
if not args.n:
|
if not args.n:
|
||||||
wallpaper.change(colors_plain["wallpaper"])
|
wallpaper.change(colors_plain["wallpaper"])
|
||||||
|
|
||||||
if not args.s:
|
sequences.send(colors_plain, to_send=not args.s)
|
||||||
sequences.send(colors_plain)
|
|
||||||
|
|
||||||
export.every(colors_plain)
|
export.every(colors_plain)
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ def create_sequences(colors):
|
|||||||
return "".join(sequences)
|
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."""
|
"""Send colors to all open terminals."""
|
||||||
if OS == "Darwin":
|
if OS == "Darwin":
|
||||||
tty_pattern = "/dev/ttys00[0-9]*"
|
tty_pattern = "/dev/ttys00[0-9]*"
|
||||||
@ -84,6 +84,7 @@ def send(colors, cache_dir=CACHE_DIR):
|
|||||||
sequences = create_sequences(colors)
|
sequences = create_sequences(colors)
|
||||||
|
|
||||||
# Writing to "/dev/pts/[0-9] lets you send data to open terminals.
|
# Writing to "/dev/pts/[0-9] lets you send data to open terminals.
|
||||||
|
if to_send:
|
||||||
for term in glob.glob(tty_pattern):
|
for term in glob.glob(tty_pattern):
|
||||||
util.save_file(sequences, term)
|
util.save_file(sequences, term)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user