diff options
-rw-r--r-- | alot/defaults/default.bindings | 66 | ||||
-rw-r--r-- | alot/settings/__init__.py | 8 | ||||
-rwxr-xr-x | setup.py | 1 |
3 files changed, 72 insertions, 3 deletions
diff --git a/alot/defaults/default.bindings b/alot/defaults/default.bindings new file mode 100644 index 00000000..204f3cb6 --- /dev/null +++ b/alot/defaults/default.bindings @@ -0,0 +1,66 @@ +j = move down +k = move up +' ' = move page down +esc = cancel +enter = select +@ = refresh +? = help bindings +I = search tag:inbox AND NOT tag:killed +L = taglist +shift tab = bprevious +U = search tag:unread +tab = bnext +\ = prompt 'search ' +d = bclose +$ = flush +m = compose +o = prompt 'search ' +q = exit +';' = bufferlist +':' = prompt + +[bufferlist] + x = close + select = openfocussed + +[search] + a = toggletags inbox + & = toggletags killed + ! = toggletags flagged + s = toggletags unread + l = retagprompt + O = refineprompt + | = refineprompt + +[envelope] + a = prompt 'attach ~/' + y = send + P = save + s = 'refine Subject' + t = 'refine To' + b = 'refine Bcc' + c = 'refine Cc' + S = togglesign + select = edit + H = toggleheaders + +[taglist] + +[thread] + C = fold --all + E = unfold --all + c = fold + e = unfold + < = fold + > = unfold + H = toggleheaders + h = togglesource + P = print --all --separately --add_tags + S = save --all + g = reply --all + f = forward + p = print --add_tags + n = editnew + s = save + r = reply + | = prompt 'pipeto ' diff --git a/alot/settings/__init__.py b/alot/settings/__init__.py index 0edfc24c..35599fa8 100644 --- a/alot/settings/__init__.py +++ b/alot/settings/__init__.py @@ -44,8 +44,8 @@ class SettingsManager(object): theme_path = theme or os.path.join(DEFAULTSPATH, 'default.theme') self._theme = Theme(theme_path) - self._bindings = ConfigObj() - + bindings_path = os.path.join(DEFAULTSPATH, 'default.bindings') + self._bindings = ConfigObj(bindings_path) self._config = ConfigObj() self._accounts = None self._accountmap = None @@ -331,7 +331,9 @@ class SettingsManager(object): cmdline = bindings[key] if mode in bindings.sections: if key in bindings[mode].scalars: - cmdline = bindings[mode][key] + value = bindings[mode][key] + if value: + cmdline = value return cmdline def get_accounts(self): @@ -18,6 +18,7 @@ setup(name='alot', 'defaults/notmuch.rc.spec', 'defaults/abook_contacts.spec', 'defaults/default.theme', + 'defaults/default.bindings', 'defaults/config.stub', 'defaults/theme.spec', ]}, |