diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-12-30 07:20:07 +1100 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-12-30 07:20:07 +1100 |
| commit | 3cecd3d504c469324cc8e6b3950fe0ebcab7c780 (patch) | |
| tree | 9a4af286bd978cac81986079b02a623089044ad0 | |
| parent | 0d2c0daff0d8bbe64aa43d16d307a621d2187cce (diff) | |
reload: Add back -r but write error to stderr
| -rw-r--r-- | pywal/__main__.py | 8 | ||||
| -rw-r--r-- | pywal/reload.py | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/pywal/__main__.py b/pywal/__main__.py index cb658d2..15a8b70 100644 --- a/pywal/__main__.py +++ b/pywal/__main__.py @@ -94,9 +94,11 @@ def process_args(args): sys.exit(0) if args.r: - print("'wal -r' is deprecated: " - "Use 'cat ~/.cache/wal/sequences' instead.") - sys.exit(1) + sys.stderr.write("'wal -r' is deprecated: " + "Use 'cat ~/.cache/wal/sequences' instead.\n") + + reload.colors() + sys.exit(0) if args.q: sys.stdout = sys.stderr = open(os.devnull, "w") diff --git a/pywal/reload.py b/pywal/reload.py index f66cc96..629a448 100644 --- a/pywal/reload.py +++ b/pywal/reload.py @@ -56,6 +56,14 @@ def sway(): util.disown(["swaymsg", "reload"]) +def colors(cache_dir=CACHE_DIR): + """Reload colors. (Deprecated)""" + sequences = os.path.join(cache_dir, "sequences") + + if os.path.isfile(sequences): + print("".join(util.read_file(sequences)), end="") + + def env(xrdb_file=None): """Reload environment.""" gtk() |
