AnthonyDiGirolamo / todotxt-machine

an interactive terminal based todo.txt file editor with an interface similar to mutt
https://pypi.python.org/pypi/todotxt-machine/
GNU General Public License v3.0
244 stars 37 forks source link

Add the possibility to have it's own key bindings in config file #27

Closed rpesche closed 9 years ago

rpesche commented 9 years ago

Some work need to be done

I will do it in the next days

AnthonyDiGirolamo commented 9 years ago

Nice work @rpesche the only error I can see is that the toggle-border function isn't working. Could you apply this fix?

diff --git a/todotxt_machine/urwid_ui.py b/todotxt_machine/urwid_ui.py
index 9b77a2e..f7bdf57 100644
--- a/todotxt_machine/urwid_ui.py
+++ b/todotxt_machine/urwid_ui.py
@@ -494,7 +494,7 @@ class UrwidUI:
             self.clear_filters()
         elif self.key_bindings.is_binded_to(input, 'toggle-wrapping'):
             self.toggle_wrapping()
-        elif self.key_bindings.is_binded_to(input, 'toggle-toolbar'):
+        elif self.key_bindings.is_binded_to(input, 'toggle-borders'):
             self.toggle_border()
         elif self.key_bindings.is_binded_to(input, 'toggle-sorting'):
             self.toggle_sorting()

Do you want to finish implementing those changes you mention before merging?

AnthonyDiGirolamo commented 9 years ago

I just merged in pull request #18 that adds a couple more key bindings in edit mode. Could you add in those as well?

AnthonyDiGirolamo commented 9 years ago

Thanks very much for your work! I've been meaning to add this support for a long time.

rpesche commented 9 years ago

Thank for your response.

I think you can merge this. The remained tasks are just here for more comfort.

(I did commit your fix about 'toggle-border' mistake

AnthonyDiGirolamo commented 9 years ago

Hey @rpesche I got this merged and added a --show-default-bindings option that can be appended to the config file. Also made the in app help show currently configured bindings. If you can give it a try and let me know what you think.