diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2018-03-16 08:54:08 +1100 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2018-03-16 08:54:08 +1100 |
| commit | 4492587c17d52ea3b50449a83a1357def2e51738 (patch) | |
| tree | c847eb81a551acc4c834d67187bbdbeab47ed399 /pywal/__main__.py | |
| parent | 7db89a390728944637fc4c3517894f3d22543447 (diff) | |
misc: cleanup
Diffstat (limited to 'pywal/__main__.py')
| -rw-r--r-- | pywal/__main__.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/pywal/__main__.py b/pywal/__main__.py index 05f96e7..43f4465 100644 --- a/pywal/__main__.py +++ b/pywal/__main__.py @@ -104,6 +104,14 @@ def process_args(args): reload.colors() sys.exit(0) + if args.f == "list_themes": + themes = os.listdir(os.path.join(CONF_DIR, "colorschemes")) + themes += os.listdir(os.path.join(MODULE_DIR, "colorschemes")) + themes = [theme.replace(".json", "") for theme in themes] + + print("Themes:", ", ".join(themes)) + sys.exit(0) + if args.q: sys.stdout = sys.stderr = open(os.devnull, "w") @@ -124,15 +132,6 @@ def process_args(args): image_file = image.get(args.i) colors_plain = colors.get(image_file, light=args.l) - if args.f == "list_themes": - themes = os.listdir(os.path.join(CONF_DIR, "colorschemes")) - themes += os.listdir(os.path.join(MODULE_DIR, "colorschemes")) - - print("Themes:", - ", ".join([theme.replace(".json", "") for theme in themes])) - - sys.exit(0) - if args.f: colors_plain = colors.file(args.f) |
