mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-25 07:19:27 +01:00
reload: Add back -r but write error to stderr
This commit is contained in:
parent
0d2c0daff0
commit
3cecd3d504
@ -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")
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user