diff --git a/pywal/__main__.py b/pywal/__main__.py index f6e8222..a06eab9 100644 --- a/pywal/__main__.py +++ b/pywal/__main__.py @@ -118,12 +118,13 @@ def parse_args_exit(parser): if args.theme == "list_themes": themes = [theme.name.replace(".json", "") for theme in theme.list_themes()] - print("Themes:", themes) - print("Extra: 'random' (select a random theme)") + print("\n - ".join(["\033[1;32mThemes\033[0m:", *sorted(themes)])) + print("\033[1;32mExtra\033[0m:\n - random (select a random theme)") sys.exit(0) if args.backend == "list_backends": - print("Backends:", colors.list_backends()) + print("\n - ".join(["\033[1;32mBackends\033[0m:", + *colors.list_backends()])) sys.exit(0) diff --git a/pywal/theme.py b/pywal/theme.py index c331d24..b0dbbf6 100644 --- a/pywal/theme.py +++ b/pywal/theme.py @@ -12,8 +12,10 @@ from . import util def list_themes(): """List all installed theme files.""" - return [*os.scandir(os.path.join(CONF_DIR, "colorschemes")), - *os.scandir(os.path.join(MODULE_DIR, "colorschemes"))] + themes = [*os.scandir(os.path.join(CONF_DIR, "colorschemes")), + *os.scandir(os.path.join(MODULE_DIR, "colorschemes"))] + + return [t for t in themes if os.path.isfile(t)] def terminal_sexy_to_wal(data):