X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=patches%2Fterminal_velocity_sort_found_notes.patch;h=2bc563c6b942996071d0e110a818f04190c87ef0;hp=8296d54a68f3c23a12cf39bdd6ef12dab4c57ef6;hb=fcf18de4a44fcc496837fbb6eedcc01e5f6eb680;hpb=c92933bfa2d95533ea5c8650ff4d40b6621e600f diff --git a/patches/terminal_velocity_sort_found_notes.patch b/patches/terminal_velocity_sort_found_notes.patch index 8296d54..2bc563c 100644 --- a/patches/terminal_velocity_sort_found_notes.patch +++ b/patches/terminal_velocity_sort_found_notes.patch @@ -1,8 +1,14 @@ +commit 0f9df37046e58c8963aff93c649e5d3dbf2202bd +Author: Ismaël Bouya +Date: Sat Mar 9 20:11:46 2019 +0100 + + Add sorting option + diff --git a/terminal_velocity/terminal_velocity.py b/terminal_velocity/terminal_velocity.py -index db2eb05..bb77dc6 100755 +index a53eda3..5f0e213 100755 --- a/terminal_velocity/terminal_velocity.py +++ b/terminal_velocity/terminal_velocity.py -@@ -75,6 +75,10 @@ the default default will be used""" +@@ -90,6 +90,10 @@ the default default will be used""" default=defaults.get("log_file", "~/.tvlog"), help="the file to log to (default: %(default)s)") @@ -13,15 +19,15 @@ index db2eb05..bb77dc6 100755 parser.add_argument("-p", "--print-config", dest="print_config", action="store_true", default=False, help="print your configuration settings then exit") -@@ -120,7 +124,7 @@ the default default will be used""" +@@ -138,7 +142,7 @@ the default default will be used""" try: urwid_ui.launch(notes_dir=args.notes_dir, editor=args.editor, extension=args.extension, extensions=args.extensions, - exclude=args.exclude) + exclude=args.exclude, sort=args.sort) except KeyboardInterrupt: - # Silence KeyboardInterrupt tracebacks on ctrl-c. - sys.exit() + # Run the shutdown hook + shutdown() diff --git a/terminal_velocity/urwid_ui.py b/terminal_velocity/urwid_ui.py index 34cf4f6..caebcb9 100644 --- a/terminal_velocity/urwid_ui.py