diff options
Diffstat (limited to 'alot')
-rwxr-xr-x | alot/init.py | 9 | ||||
-rw-r--r-- | alot/settings.py | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/alot/init.py b/alot/init.py index e5a13a5b..9972e42f 100755 --- a/alot/init.py +++ b/alot/init.py @@ -52,7 +52,7 @@ def parse_args(): default='/dev/null', help='logfile') parser.add_argument('query', nargs='?', - default='tag:inbox AND NOT tag:killed', + default='', help='initial searchstring') return parser.parse_args() @@ -87,11 +87,16 @@ def main(): command_map['enter'] = 'select' command_map['esc'] = 'cancel' + # get initial searchstring + query = settings.config.get('general','initial_searchstring') + if args.query != '': + query = args.query + # set up and start interface ui = UI(dbman, logger, aman, - args.query, + query, args.colours, ) diff --git a/alot/settings.py b/alot/settings.py index ef3babff..4ddf4fce 100644 --- a/alot/settings.py +++ b/alot/settings.py @@ -42,6 +42,7 @@ DEFAULTS = { 'bug_on_exit': 'False', 'timestamp_format': '', 'print_cmd': 'muttprint', + 'initial_searchstring': 'tag:inbox AND NOT tag:killed', }, '16c-theme': { 'bufferlist_focus_bg': 'dark gray', |