summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/poezio.py3
-rw-r--r--src/theme.py7
2 files changed, 7 insertions, 3 deletions
diff --git a/src/poezio.py b/src/poezio.py
index 542c9196..237f2571 100644
--- a/src/poezio.py
+++ b/src/poezio.py
@@ -86,5 +86,6 @@ def main():
gui.main_loop() # Refresh the screen, wait for user events etc
if __name__ == '__main__':
- os.environ['TERM'] = 'xterm-256color' # FIXME
+ if os.environ['TERM'] != 'screen':
+ os.environ['TERM'] = 'xterm-256color' # FIXME
main()
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