mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-24 23:09:16 +01:00
themes: Enhance listing.
This commit is contained in:
parent
59b4c54086
commit
68e20cc90a
@ -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)
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user