diff --git a/pywal/__main__.py b/pywal/__main__.py index ff09f13..61c3771 100755 --- a/pywal/__main__.py +++ b/pywal/__main__.py @@ -61,7 +61,6 @@ def process_args(args): # -q if args.q: sys.stdout = sys.stderr = open(os.devnull, "w") - g.Args.notify = False # -c if args.c: @@ -82,7 +81,7 @@ def process_args(args): image = gen_colors.get_image(args.i) # Create a list of hex colors. - colors_plain = gen_colors.get_colors(image) + colors_plain = gen_colors.get_colors(image, args.q) colors_plain[8] = set_colors.set_grey(colors_plain) if not args.n: diff --git a/pywal/gen_colors.py b/pywal/gen_colors.py index 6c3293a..5c5fb1b 100755 --- a/pywal/gen_colors.py +++ b/pywal/gen_colors.py @@ -84,7 +84,7 @@ def gen_colors(img): return [re.search("#.{6}", str(col)).group(0) for col in raw_colors] -def get_colors(img): +def get_colors(img, quiet): """Generate a colorscheme using imagemagick.""" # Cache the wallpaper name. util.save_file(img, g.CACHE_DIR / "wal") @@ -98,7 +98,7 @@ def get_colors(img): else: print("colors: Generating a colorscheme...") - if g.Args.notify: + if not quiet: util.disown("notify-send", "wal: Generating a colorscheme...") # Generate the colors. @@ -109,7 +109,7 @@ def get_colors(img): util.save_file("\n".join(colors), cache_file) print("colors: Generated colorscheme") - if g.Args.notify: + if not quiet: util.disown("notify-send", "wal: Generation complete.") return colors diff --git a/pywal/globals.py b/pywal/globals.py index 6a45fa8..c72b37a 100755 --- a/pywal/globals.py +++ b/pywal/globals.py @@ -10,9 +10,3 @@ __version__ = "0.2.0" # Internal variables. COLOR_COUNT = 16 CACHE_DIR = pathlib.Path.home() / ".cache/wal/" - - -# pylint: disable=too-few-public-methods -class Args(object): - """Store args.""" - notify = True