From 68e20cc90a1037bc4f4e16a79bb3add922c5711c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 3 Apr 2018 12:06:41 +1000 Subject: themes: Enhance listing. --- pywal/theme.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pywal/theme.py') 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): -- cgit v1.2.3