terminatorlib.plugins package

Submodules

terminatorlib.plugins.activitywatch module

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

class terminatorlib.plugins.activitywatch.ActivityWatch[source]

Bases: terminatorlib.plugin.MenuItem

Add custom commands to the terminal menu

__init__()[source]
callback(menuitems, menu, terminal)[source]

Add our menu item to the menu

notify(_vte, terminal)[source]

Notify that a terminal did something

unwatch(_widget, terminal)[source]

Stop watching a terminal

watch(_widget, terminal)[source]

Watch a terminal

capabilities = ['terminal_menu']
last_notifies = None
timers = None
watches = None
class terminatorlib.plugins.activitywatch.InactivityWatch[source]

Bases: terminatorlib.plugin.MenuItem

Add custom commands to notify when a terminal goes inactive

__init__()[source]
callback(menuitems, menu, terminal)[source]

Add our menu item to the menu

check_times(terminal)[source]

Check if this terminal has gone silent

reset_timer(_vte, terminal)[source]

Reset the last-changed time for a terminal

unwatch(_vte, terminal)[source]

Unwatch a terminal

watch(_widget, terminal)[source]

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[source]

Bases: terminatorlib.plugin.MenuItem

Add custom commands to the terminal menu

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

Add our menu items to the menu

configure(widget, data=None)[source]
on_delete(button, data)[source]
on_edit(button, data)[source]
on_go_down(button, data)[source]
on_go_up(button, data)[source]
on_goto_last(button, data)[source]
on_goto_top(button, data)[source]
on_new(button, data)[source]
on_selection_changed(selection, data=None)[source]
on_toggled(widget, path, data)[source]
update_cmd_list(store)[source]
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[source]

Bases: terminatorlib.plugin.MenuItem

Add custom command to the terminal menu

__init__()[source]
callback(menuitems, menu, terminal)[source]

Add save menu item to the menu

save(terminal)[source]

‘contents-changed’ callback

start_logger(_widget, Terminal)[source]

Handle menu item callback by saving text to a file

stop_logger(_widget, terminal)[source]
write_content(terminal, row_start, col_start, row_end, col_end)[source]

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[source]

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)[source]
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[source]

Bases: terminatorlib.plugin.MenuItem

Add custom commands to the terminal menu

__init__()[source]
callback(menuitems, menu, terminal)[source]

Add our menu items to the menu

terminalshot(_widget, terminal)[source]

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[source]

Bases: terminatorlib.plugin.Plugin

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

terminatorlib.plugins.url_handlers module

url_handlers.py - Default plugins for URL handling

class terminatorlib.plugins.url_handlers.APTURLHandler[source]

Bases: terminatorlib.plugin.URLHandler

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

callback(url)[source]

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[source]

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)[source]

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[source]

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)[source]

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