summaryrefslogtreecommitdiff
path: root/src/theme.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/theme.py')
-rw-r--r--src/theme.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/theme.py b/src/theme.py
index e8100a62..aa27ce88 100644
--- a/src/theme.py
+++ b/src/theme.py
@@ -123,8 +123,11 @@ def init_colors():
reload_theme()
def reload_theme():
- themes_dir = config.get('themes_dir',
- os.path.join(os.environ.get('XDG_DATA_HOME') or os.path.join(os.environ.get('HOME'), '.local', 'share'), 'poezio', 'themes'))
+ themes_dir = config.get('themes_dir', '')
+ themes_dir = themes_dir or\
+ os.path.join(os.environ.get('XDG_DATA_HOME') or\
+ os.path.join(os.environ.get('HOME'), '.local', 'share'),
+ 'poezio', 'themes')
try:
os.makedirs(themes_dir)
# if the directory didn't exist, copy the default themes