diff options
-rw-r--r-- | alot/defaults/alot.rc | 14 | ||||
-rwxr-xr-x | alot/init.py | 8 | ||||
-rw-r--r-- | alot/ui.py | 3 |
3 files changed, 13 insertions, 12 deletions
diff --git a/alot/defaults/alot.rc b/alot/defaults/alot.rc index 1426c5e4..67f767a8 100644 --- a/alot/defaults/alot.rc +++ b/alot/defaults/alot.rc @@ -34,7 +34,9 @@ notify_timeout = 2 # display statusline? show_statusbar = True +# use terminal_command to spawn a new terminal for the editor? spawn_editor = False + # set terminal for asynchronous editing terminal_cmd = x-terminal-emulator -e @@ -49,10 +51,7 @@ timestamp_format = '' # muttprint/a2ps works nicely print_cmd = '' -#initial searchstring when none is given as argument: -initial_searchstring = tag:inbox AND NOT tag:killed - -#initial searchstring when none is given as argument: +# initial searchstring when none is given as argument: initial_searchstring = tag:inbox AND NOT tag:killed # in case more than one account has an addressbook: @@ -60,6 +59,13 @@ initial_searchstring = tag:inbox AND NOT tag:killed # look in the abook of the account matching the sender address complete_matching_abook_only = False +[urwid-maps] +j = cursor down +k = cursor up +' ' = cursor page down +enter = select +esc = cancel + [global-maps] @ = refresh I = search tag:inbox AND NOT tag:killed diff --git a/alot/init.py b/alot/init.py index 93c84149..ea3d32b1 100755 --- a/alot/init.py +++ b/alot/init.py @@ -25,7 +25,6 @@ import settings from account import AccountManager from db import DBManager from ui import UI -from urwid.command_map import command_map def parse_args(): @@ -97,13 +96,6 @@ def main(): # get ourselves a database manager dbman = DBManager(path=args.db_path, ro=args.read_only) - # set up global urwid command maps - command_map['j'] = 'cursor down' - command_map['k'] = 'cursor up' - command_map[' '] = 'cursor page down' - command_map['enter'] = 'select' - command_map['esc'] = 'cancel' - # get initial searchstring query = settings.config.get('general', 'initial_searchstring') if args.query != '': @@ -71,6 +71,9 @@ class UI(object): self.mode = '' self.commandprompthistory = [] + for key, value in config.items('urwid-maps'): + command_map[key] = value + self.logger.debug('setup bindings') cmd = commandfactory('search', query=initialquery) self.apply_command(cmd) |