From f704bece873a307b1c0d3bb5cb8dd2ddd2a7be50 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Thu, 29 Sep 2011 09:34:06 +0200 Subject: Remove duplicated entry --- alot/defaults/alot.rc | 3 --- 1 file changed, 3 deletions(-) (limited to 'alot') diff --git a/alot/defaults/alot.rc b/alot/defaults/alot.rc index 1426c5e4..ea618bc5 100644 --- a/alot/defaults/alot.rc +++ b/alot/defaults/alot.rc @@ -52,9 +52,6 @@ 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 = tag:inbox AND NOT tag:killed - # in case more than one account has an addressbook: # Set this to True to make tabcompletion for recipients during compose only # look in the abook of the account matching the sender address -- cgit v1.2.3 From 29b89cb8ac07649939d62ea036777c3ab1d62007 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Thu, 29 Sep 2011 09:36:37 +0200 Subject: Document spawn_editor --- alot/defaults/alot.rc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'alot') diff --git a/alot/defaults/alot.rc b/alot/defaults/alot.rc index ea618bc5..69843df5 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 -- cgit v1.2.3 From 2a67110aa723655f312855bab2de617f1910f60c Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Thu, 29 Sep 2011 09:37:03 +0200 Subject: Cosmetic fix --- alot/defaults/alot.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alot') diff --git a/alot/defaults/alot.rc b/alot/defaults/alot.rc index 69843df5..10b40aa3 100644 --- a/alot/defaults/alot.rc +++ b/alot/defaults/alot.rc @@ -51,7 +51,7 @@ timestamp_format = '' # muttprint/a2ps works nicely print_cmd = '' -#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: -- cgit v1.2.3 From 9e6da332c784241ae71940b0e1d6ca324886f65a Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Thu, 29 Sep 2011 10:00:07 +0200 Subject: Move urwid maps to config file --- alot/defaults/alot.rc | 7 +++++++ alot/init.py | 8 -------- alot/ui.py | 3 +++ 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'alot') diff --git a/alot/defaults/alot.rc b/alot/defaults/alot.rc index 10b40aa3..67f767a8 100644 --- a/alot/defaults/alot.rc +++ b/alot/defaults/alot.rc @@ -59,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 != '': diff --git a/alot/ui.py b/alot/ui.py index 2e58dc86..5f89e99d 100644 --- a/alot/ui.py +++ b/alot/ui.py @@ -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) -- cgit v1.2.3