summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-07 23:59:35 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-07 23:59:35 +0000
commitf1226c1bc9284af783bebe9bba41f54e4d59a7a9 (patch)
tree74c5778ada14bd9278ebdbc5656155cc2ad3bc6d /src
parentf8ab739a36f7599f4f84590694c02ff3e0f2dd71 (diff)
downloadpoezio-f1226c1bc9284af783bebe9bba41f54e4d59a7a9.tar.gz
poezio-f1226c1bc9284af783bebe9bba41f54e4d59a7a9.tar.bz2
poezio-f1226c1bc9284af783bebe9bba41f54e4d59a7a9.tar.xz
poezio-f1226c1bc9284af783bebe9bba41f54e4d59a7a9.zip
fix colors in tmux or screen, fix the themes_dir config option
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