diff options
author | pazz <patricktotzke@gmail.com> | 2011-06-06 23:01:02 +0100 |
---|---|---|
committer | pazz <patricktotzke@gmail.com> | 2011-06-06 23:01:02 +0100 |
commit | 6cf5111820ea7b4a745994dd9166c292919bb5cc (patch) | |
tree | e5538192d012b5d2b72a5949fc4edd7b7d52c8f7 /alot | |
parent | 266ce89d577d78aa717b28711f1abb18bc2153be (diff) |
read default colourmode from config file
Diffstat (limited to 'alot')
-rwxr-xr-x | alot/init.py | 1 | ||||
-rw-r--r-- | alot/settings.py | 1 | ||||
-rw-r--r-- | alot/ui.py | 4 |
3 files changed, 4 insertions, 2 deletions
diff --git a/alot/init.py b/alot/init.py index 775c6a6d..085eeeed 100755 --- a/alot/init.py +++ b/alot/init.py @@ -33,7 +33,6 @@ def parse_args(): parser.add_argument('-C', dest='colours', type=int, choices=[1, 16, 88, 256], - default=16, help='colour mode') parser.add_argument('-r', dest='read_only', action='store_true', diff --git a/alot/settings.py b/alot/settings.py index cb16a298..3ade500c 100644 --- a/alot/settings.py +++ b/alot/settings.py @@ -25,6 +25,7 @@ class ListConfigParser(SafeConfigParser): return [s.strip() for s in value.split(',')] DEFAULTS = { + 'colourmode': '16', 'editor_cmd': "/usr/bin/vim -f -c 'set filetype=mail' ", 'pager_cmd': "/usr/bin/view -f -c 'set filetype=mail' ", 'terminal_cmd': 'urxvt -T notmuch -e', @@ -33,7 +33,9 @@ class UI: self.logger = log self.dbman = db - self.logger.debug('setup gui: %d' % colourmode) + if not colourmode: + colourmode = config.getint('general', 'colourmode') + self.logger.info('setup gui in %d colours' % colourmode) self.mainframe = urwid.Frame(urwid.SolidFill(' ')) self.mainloop = urwid.MainLoop(self.mainframe, palette, |