Merge lp://staging/~waldner/terminator/plugin-ng into lp://staging/terminator/gtk3

Proposed by Waldner
Status: Needs review
Proposed branch: lp://staging/~waldner/terminator/plugin-ng
Merge into: lp://staging/terminator/gtk3
Diff against target: 626 lines (+398/-94)
5 files modified
plugin-ng.md (+129/-0)
terminatorlib/plugin.py (+38/-2)
terminatorlib/terminal.py (+129/-70)
terminatorlib/terminal_popup_menu.py (+68/-21)
terminatorlib/terminator.py (+34/-1)
To merge this branch: bzr merge lp://staging/~waldner/terminator/plugin-ng
Reviewer Review Type Date Requested Status
Terminator Pending
Review via email: mp+341537@code.staging.launchpad.net

Commit message

New plugin framework "plugin_ng"

Description of the change

New plugin framework "plugin_ng". See https://bazaar.launchpad.net/~waldner/terminator/plugin-ng/view/head:/plugin-ng.md for a description.

To post a comment you must log in.
Revision history for this message
Waldner (waldner) wrote :

Is this too invasive? Bad style? All comments welcome.

Revision history for this message
Bryce Harrington (bryce) wrote :

I like the idea of generalizing the handling of selected patterns and being able to extend it to show different kinds of context menus. Conceptually seems quite interesting. Style looks fine to me, in fact it refactors things to look a bit cleaner. Needs a better name (I don't have suggestions myself, sorry), and I would like to see a couple use case/example ideas at the top of the docs (i.e. what are some useful kinds of things people could expect do with this functionality). A test/example plugin should be included. Those three things fixed I'd give this a +1.

Revision history for this message
Waldner (waldner) wrote :

For an example plugin, see https://github.com/waldner/terminator-runwith-plugin (needs the plugin-ng patched terminator, of course). There are some (admittedly simplistic and a bit silly) usage examples there as well.

I'll think about the name (suggestions welcome). What I use it for is to extract patterns from the terminal text (regex can include context, later thrown away, to avoid false matches) and use them as arguments to an external program or command. Think: you have a filename, and want to open it with your editor of choice. You have a github URL, and you want to run "git clone" with it. (more to be added)
Right-click on the element, runwith -> yourcommand and you're done. I'll try to come up with more use cases. Perhaps it's not a popular thing to do, but it definitely helped me.

Revision history for this message
Waldner (waldner) wrote :

Probably the most notable use case is the ability to create true context-sensitive menus, which was plain impossible with the old plugin system.

Unmerged revisions

1795. By Waldner

New plugin framework "plugin_ng".

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: