# terminatorlib.plugins package

## Submodules

## terminatorlib.plugins.activitywatch module

activitywatch.py - Terminator Plugin to watch a terminal for activity

class `terminatorlib.plugins.activitywatch.``ActivityWatch`

  Bases: `terminatorlib.plugin.MenuItem`

  Add custom commands to the terminal menu

  `__init__`()
  `callback`(menuitems, menu, terminal)

    Add our menu item to the menu

  `notify`(_vte, terminal)

    Notify that a terminal did something

  `unwatch`(_widget, terminal)

    Stop watching a terminal

  `watch`(_widget, terminal)

    Watch a terminal

  `capabilities` = ['terminal_menu']
  `last_notifies` = None
  `timers` = None
  `watches` = None

class `terminatorlib.plugins.activitywatch.``InactivityWatch`

  Bases: `terminatorlib.plugin.MenuItem`

  Add custom commands to notify when a terminal goes inactive

  `__init__`()
  `callback`(menuitems, menu, terminal)

    Add our menu item to the menu

  `check_times`(terminal)

    Check if this terminal has gone silent

  `reset_timer`(_vte, terminal)

    Reset the last-changed time for a terminal

  `unwatch`(_vte, terminal)

    Unwatch a terminal

  `watch`(_widget, terminal)

    Watch a terminal

  `capabilities` = ['terminal_menu']
  `last_activities` = None
  `timers` = None
  `watches` = None

## terminatorlib.plugins.custom_commands module

custom_commands.py - Terminator Plugin to add custom command menu entries

class `terminatorlib.plugins.custom_commands.``CustomCommandsMenu`

  Bases: `terminatorlib.plugin.MenuItem`

  Add custom commands to the terminal menu

  `__init__`()
  `_create_command_dialog`(enabled_var=False, name_var='', command_var='')
  `_error`(msg)
  `_execute`(widget, data)
  `_save_config`()
  `callback`(menuitems, menu, terminal)

    Add our menu items to the menu

  `configure`(widget, data=None)
  `on_delete`(button, data)
  `on_edit`(button, data)
  `on_go_down`(button, data)
  `on_go_up`(button, data)
  `on_goto_last`(button, data)
  `on_goto_top`(button, data)
  `on_new`(button, data)
  `on_selection_changed`(selection, data=None)
  `on_toggled`(widget, path, data)
  `update_cmd_list`(store)
  `capabilities` = ['terminal_menu']
  `cmd_list` = {}
  `conf_file` = '/home/sboddy/.config/terminator/custom_commands'

## terminatorlib.plugins.logger module

logger.py - Terminator Plugin to log ‘content’ of individual terminals

class `terminatorlib.plugins.logger.``Logger`

  Bases: `terminatorlib.plugin.MenuItem`

  Add custom command to the terminal menu

  `__init__`()
  `callback`(menuitems, menu, terminal)

    Add save menu item to the menu

  `save`(terminal)

    ‘contents-changed’ callback

  `start_logger`(_widget, Terminal)

    Handle menu item callback by saving text to a file

  `stop_logger`(_widget, terminal)
  `write_content`(terminal, row_start, col_start, row_end, col_end)

    Final function to write a file

  `capabilities` = ['terminal_menu']
  `dialog_action` = <enum GTK_FILE_CHOOSER_ACTION_SAVE of type GtkFileChooserAction>
  `dialog_buttons` = ('gtk-cancel', <enum GTK_RESPONSE_CANCEL of type GtkResponseType>, 'gtk-save', <enum GTK_RESPONSE_OK of type GtkResponseType>)
  `loggers` = None

## terminatorlib.plugins.maven module

class `terminatorlib.plugins.maven.``MavenPluginURLHandler`

  Bases: `terminatorlib.plugin.URLHandler`

  Maven plugin handler. If the name of a Maven plugin is detected, it is turned into a link to its documentation site. If a Maven plugin goal is detected, the link points to the particular goal page. Only Apache (org.apache.maven.plugins) and Codehaus (org.codehaus.mojo) plugins are supported.

  `callback`(url)
  `capabilities` = ['url_handler']
  `handler_name` = 'maven_plugin'
  `match` = '\\b(maven\\-(clean|compiler|deploy|failsafe|install|resources|site|surefire|verifier|ear|ejb|jar|rar|war|shade|changelog|changes|checkstyle|clover|doap|docck|javadoc|jxr|linkcheck|pmd|project-info-reports|surefire-report|ant|antrun|archetype|assembly|dependency|enforcer|gpg|help|invoker|jarsigner|one|patch|pdf|plugin|release|reactor|remote-resources|repository|scm|source|stage|toolchains|eclipse|idea)\\-plugin|(jboss|jboss-packaging|tomcat|was6|antlr|antlr3|aspectj|axistools|castor|commons-attributes|gwt|hibernate3|idlj|javacc|jaxb2|jpox|jspc|openjpa|rmic|sablecc|sqlj|sysdeo-tomcat|xmlbeans|xdoclet|netbeans-freeform|nbm|clirr|cobertura|taglist|scmchangelog|findbugs|fitnesse|selenium|animal-sniffer|appassembler|build-helper|exec|keytool|latex|ounce|rpm|sql|versions|apt|cbuilds|jspc|native|retrotranslator|springws|smc|ideauidesigner|dita|docbook|javancss|jdepend|dashboard|emma|sonar|jruby|dbunit|shitty|batik|buildnumber|ianal|jalopy|jasperreports|l10n|minijar|native2ascii|osxappbundle|properties|solaris|truezip|unix|virtualization|wagon|webstart|xml|argouml|dbupgrade|chronos|ckjm|codenarc|deb|ec2|enchanter|ejbdoclet|graphing|j2me|javascript tools|jardiff|kodo|macker|springbeandoc|mock-repository|nsis|pomtools|setup|simian-report|syslog|visibroker|weblogic|webdoclet|xjc|xsltc)\\-maven\\-plugin)(:[a-zA-Z0-9\\.-]+:[a-zA-Z-]+)?\\b'
  `maven_filters` = {'codehaus_maven_plugin_shortname': 'jboss|jboss-packaging|tomcat|was6|antlr|antlr3|aspectj|axistools|castor|commons-attributes|gwt|hibernate3|idlj|javacc|jaxb2|jpox|jspc|openjpa|rmic|sablecc|sqlj|sysdeo-tomcat|xmlbeans|xdoclet|netbeans-freeform|nbm|clirr|cobertura|taglist|scmchangelog|findbugs|fitnesse|selenium|animal-sniffer|appassembler|build-helper|exec|keytool|latex|ounce|rpm|sql|versions|apt|cbuilds|jspc|native|retrotranslator|springws|smc|ideauidesigner|dita|docbook|javancss|jdepend|dashboard|emma|sonar|jruby|dbunit|shitty|batik|buildnumber|ianal|jalopy|jasperreports|l10n|minijar|native2ascii|osxappbundle|properties|solaris|truezip|unix|virtualization|wagon|webstart|xml|argouml|dbupgrade|chronos|ckjm|codenarc|deb|ec2|enchanter|ejbdoclet|graphing|j2me|javascript tools|jardiff|kodo|macker|springbeandoc|mock-repository|nsis|pomtools|setup|simian-report|syslog|visibroker|weblogic|webdoclet|xjc|xsltc', 'maven_plugin_named_groups': '(?P<artifact_id>maven\\-(clean|compiler|deploy|failsafe|install|resources|site|surefire|verifier|ear|ejb|jar|rar|war|shade|changelog|changes|checkstyle|clover|doap|docck|javadoc|jxr|linkcheck|pmd|project-info-reports|surefire-report|ant|antrun|archetype|assembly|dependency|enforcer|gpg|help|invoker|jarsigner|one|patch|pdf|plugin|release|reactor|remote-resources|repository|scm|source|stage|toolchains|eclipse|idea)\\-plugin|(jboss|jboss-packaging|tomcat|was6|antlr|antlr3|aspectj|axistools|castor|commons-attributes|gwt|hibernate3|idlj|javacc|jaxb2|jpox|jspc|openjpa|rmic|sablecc|sqlj|sysdeo-tomcat|xmlbeans|xdoclet|netbeans-freeform|nbm|clirr|cobertura|taglist|scmchangelog|findbugs|fitnesse|selenium|animal-sniffer|appassembler|build-helper|exec|keytool|latex|ounce|rpm|sql|versions|apt|cbuilds|jspc|native|retrotranslator|springws|smc|ideauidesigner|dita|docbook|javancss|jdepend|dashboard|emma|sonar|jruby|dbunit|shitty|batik|buildnumber|ianal|jalopy|jasperreports|l10n|minijar|native2ascii|osxappbundle|properties|solaris|truezip|unix|virtualization|wagon|webstart|xml|argouml|dbupgrade|chronos|ckjm|codenarc|deb|ec2|enchanter|ejbdoclet|graphing|j2me|javascript tools|jardiff|kodo|macker|springbeandoc|mock-repository|nsis|pomtools|setup|simian-report|syslog|visibroker|weblogic|webdoclet|xjc|xsltc)\\-maven\\-plugin)(:[a-zA-Z0-9\\.-]+:(?P<goal>[a-zA-Z-]+))?', 'apache_maven_plugin_artifact_id': 'maven\\-(clean|compiler|deploy|failsafe|install|resources|site|surefire|verifier|ear|ejb|jar|rar|war|shade|changelog|changes|checkstyle|clover|doap|docck|javadoc|jxr|linkcheck|pmd|project-info-reports|surefire-report|ant|antrun|archetype|assembly|dependency|enforcer|gpg|help|invoker|jarsigner|one|patch|pdf|plugin|release|reactor|remote-resources|repository|scm|source|stage|toolchains|eclipse|idea)\\-plugin', 'maven_plugin': '(maven\\-(clean|compiler|deploy|failsafe|install|resources|site|surefire|verifier|ear|ejb|jar|rar|war|shade|changelog|changes|checkstyle|clover|doap|docck|javadoc|jxr|linkcheck|pmd|project-info-reports|surefire-report|ant|antrun|archetype|assembly|dependency|enforcer|gpg|help|invoker|jarsigner|one|patch|pdf|plugin|release|reactor|remote-resources|repository|scm|source|stage|toolchains|eclipse|idea)\\-plugin|(jboss|jboss-packaging|tomcat|was6|antlr|antlr3|aspectj|axistools|castor|commons-attributes|gwt|hibernate3|idlj|javacc|jaxb2|jpox|jspc|openjpa|rmic|sablecc|sqlj|sysdeo-tomcat|xmlbeans|xdoclet|netbeans-freeform|nbm|clirr|cobertura|taglist|scmchangelog|findbugs|fitnesse|selenium|animal-sniffer|appassembler|build-helper|exec|keytool|latex|ounce|rpm|sql|versions|apt|cbuilds|jspc|native|retrotranslator|springws|smc|ideauidesigner|dita|docbook|javancss|jdepend|dashboard|emma|sonar|jruby|dbunit|shitty|batik|buildnumber|ianal|jalopy|jasperreports|l10n|minijar|native2ascii|osxappbundle|properties|solaris|truezip|unix|virtualization|wagon|webstart|xml|argouml|dbupgrade|chronos|ckjm|codenarc|deb|ec2|enchanter|ejbdoclet|graphing|j2me|javascript tools|jardiff|kodo|macker|springbeandoc|mock-repository|nsis|pomtools|setup|simian-report|syslog|visibroker|weblogic|webdoclet|xjc|xsltc)\\-maven\\-plugin)(:[a-zA-Z0-9\\.-]+:[a-zA-Z-]+)?', 'apache_maven_plugin_shortname': 'clean|compiler|deploy|failsafe|install|resources|site|surefire|verifier|ear|ejb|jar|rar|war|shade|changelog|changes|checkstyle|clover|doap|docck|javadoc|jxr|linkcheck|pmd|project-info-reports|surefire-report|ant|antrun|archetype|assembly|dependency|enforcer|gpg|help|invoker|jarsigner|one|patch|pdf|plugin|release|reactor|remote-resources|repository|scm|source|stage|toolchains|eclipse|idea', 'maven_plugin_goal': '[a-zA-Z-]+', 'codehaus_maven_plugin_artifact_id': '(jboss|jboss-packaging|tomcat|was6|antlr|antlr3|aspectj|axistools|castor|commons-attributes|gwt|hibernate3|idlj|javacc|jaxb2|jpox|jspc|openjpa|rmic|sablecc|sqlj|sysdeo-tomcat|xmlbeans|xdoclet|netbeans-freeform|nbm|clirr|cobertura|taglist|scmchangelog|findbugs|fitnesse|selenium|animal-sniffer|appassembler|build-helper|exec|keytool|latex|ounce|rpm|sql|versions|apt|cbuilds|jspc|native|retrotranslator|springws|smc|ideauidesigner|dita|docbook|javancss|jdepend|dashboard|emma|sonar|jruby|dbunit|shitty|batik|buildnumber|ianal|jalopy|jasperreports|l10n|minijar|native2ascii|osxappbundle|properties|solaris|truezip|unix|virtualization|wagon|webstart|xml|argouml|dbupgrade|chronos|ckjm|codenarc|deb|ec2|enchanter|ejbdoclet|graphing|j2me|javascript tools|jardiff|kodo|macker|springbeandoc|mock-repository|nsis|pomtools|setup|simian-report|syslog|visibroker|weblogic|webdoclet|xjc|xsltc)\\-maven\\-plugin', 'maven_plugin_version': '[a-zA-Z0-9\\.-]+'}

## terminatorlib.plugins.terminalshot module

terminalshot.py - Terminator Plugin to take ‘screenshots’ of individual terminals

class `terminatorlib.plugins.terminalshot.``TerminalShot`

  Bases: `terminatorlib.plugin.MenuItem`

  Add custom commands to the terminal menu

  `__init__`()
  `callback`(menuitems, menu, terminal)

    Add our menu items to the menu

  `terminalshot`(_widget, terminal)

    Handle the taking, prompting and saving of a terminalshot

  `capabilities` = ['terminal_menu']
  `dialog_action` = <enum GTK_FILE_CHOOSER_ACTION_SAVE of type GtkFileChooserAction>
  `dialog_buttons` = ('gtk-cancel', <enum GTK_RESPONSE_CANCEL of type GtkResponseType>, 'gtk-save', <enum GTK_RESPONSE_OK of type GtkResponseType>)

## terminatorlib.plugins.testplugin module

class `terminatorlib.plugins.testplugin.``TestPlugin`

  Bases: `terminatorlib.plugin.Plugin`

  `do_test`()
  `capabilities` = ['test']

## terminatorlib.plugins.url_handlers module

url_handlers.py - Default plugins for URL handling

class `terminatorlib.plugins.url_handlers.``APTURLHandler`

  Bases: `terminatorlib.plugin.URLHandler`

  APT URL handler. If there is a URL that looks like an apturl, handle it appropriately

  `callback`(url)

    Actually we don’t need to do anything for this to work

  `capabilities` = ['url_handler']
  `handler_name` = 'apturl'
  `match` = '\\bapt:.*\\b'
  `namecopy` = 'Copy package URI'
  `nameopen` = 'Open software manager'

class `terminatorlib.plugins.url_handlers.``LaunchpadBugURLHandler`

  Bases: `terminatorlib.plugin.URLHandler`

  Launchpad Bug URL handler. If the URL looks like a Launchpad changelog closure entry... ‘LP: #12345’ then it should be transformed into a Launchpad Bug URL

  `callback`(url)

    Look for the number in the supplied string and return it as a URL

  `capabilities` = ['url_handler']
  `handler_name` = 'launchpad_bug'
  `match` = '\\b(lp|LP):?\\s?#?[0-9]+(,\\s*#?[0-9]+)*\\b'
  `namecopy` = 'Copy bug URL'
  `nameopen` = 'Open Launchpad bug'

class `terminatorlib.plugins.url_handlers.``LaunchpadCodeURLHandler`

  Bases: `terminatorlib.plugin.URLHandler`

  Launchpad Code URL handler. If the URL looks like a Launchpad project or branch entry then it should be transformed into a code.launchpad.net URL

  `callback`(url)

    Look for the number in the supplied string and return it as a URL

  `capabilities` = ['url_handler']
  `handler_name` = 'launchpad_code'
  `lpfilters` = {'project': '[a-z0-9]{1}[a-z0-9+.-]+', 'series': '[a-z0-9]{1}[a-z0-9+.-]+', 'group': '~[a-z0-9]{1}[a-z0-9+.-]+', 'branch': '[a-zA-Z0-9]{1}[a-zA-Z0-9_+@.-]+'}
  `match` = '\\b((lp|LP):[a-z0-9]{1}[a-z0-9+.-]+(/[a-z0-9]{1}[a-z0-9+.-]+)?|(lp|LP):~[a-z0-9]{1}[a-z0-9+.-]+/([a-z0-9]{1}[a-z0-9+.-]+|\\+junk)/[a-zA-Z0-9]{1}[a-zA-Z0-9_+@.-]+)\\b'
  `namecopy` = 'Copy branch URL'
  `nameopen` = 'Open Launchpad branch'

## Module contents