From f1226c1bc9284af783bebe9bba41f54e4d59a7a9 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Tue, 7 Sep 2010 23:59:35 +0000 Subject: fix colors in tmux or screen, fix the themes_dir config option --- src/poezio.py | 3 ++- src/theme.py | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.2.3