diff options
Diffstat (limited to 'doc/en/plugins.txt')
-rw-r--r-- | doc/en/plugins.txt | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/doc/en/plugins.txt b/doc/en/plugins.txt index 87f09cb7..f31086dc 100644 --- a/doc/en/plugins.txt +++ b/doc/en/plugins.txt @@ -61,16 +61,47 @@ Everything else is handled by that _auto_completion()_ method (checking what special completion for that command, just pass None (the default value). *del_command*:: +self+, +name+ + -This command removes a tab command added by your plugin. +This method removes a command added by your plugin. * _name_: (string) the name of the command you want to remove. +*add_key*:: +self+, +key+, +handler+ + +This method adds a global keyboard shortcut on _key_ that will call _handler_. +You can get the keys with _python3 src/keyboard.py_. + +* _key_: String representing the key press in curses. +* _handler_: Method called whenever _key_ is pressed. + +*del_key*:: +self+, +key+ + +This method deletes a keyboard shortcut previously added by your plugin. + +* _key_: String representing the key press in curses. + +*add_tab_key*:: +self+, +tab_type+, +key+, +handler+ + +This method adds a tab-custom command to poezio. For example you can add _^G_ +keybind that the user could call in a specific tab when the plugin is loaded. + +* _tab_type_: You have to _import tabs_ in order to get tabs types. The + following are possible: +** _tabs.MucTab_: The MultiUserChat tabs +** _tabs.PrivateTab_: The Private tabs +** _tabs.ConversationTab_: The Roster tab +** _tabs.RosterInfoTab_: The MultiUserChat, Private, and Conversation tabs +** _tabs.ChatTab_: The MultiUserChat, Private, and Conversation tabs +** _tabs.MucListTab_: The MultiUserChat list tabs +* _key_: (string) the curses representation of the keypress (see above). +* _handler_: (function) the handler to be called when the keypress is found. + +*del_tab_command*:: +self+, +tab_type+, +key+ +This method removes a tab command added by your plugin. + +* _key_: (string) the name of the keybind you want to remove. +* _tab_type_: the type of tab (see help for _add_key_command_) *add_tab_command*:: +self+, +tab_type+, +name+, +handler+, +help+, +completion+ + -This method adds a tab-custom command to poezio. For example you can add /dou +This method adds a tab-custom command to poezio. For example you can add a /dou command that the user could call in a specific tab when the plugin is loaded. - * _tab_type_: You have to _import tabs_ in order to get tabs types. The following are possible: ** _tabs.MucTab_: The MultiUserChat tabs @@ -95,6 +126,12 @@ Everything else is handled by that _auto_completion()_ method (checking what strings match, how to cycle between matches, etc). If you don’t want any special completion for that command, just pass None (the default value). +*del_tab_command*:: +self+, +tab_type+, +name+ +This method removes a tab command added by your plugin. + +* _name_: (string) the name of the command you want to remove. +* _tab_type_: the type of tab (see help for _add_tab_command_) + *add_event_handler**: +self+, +event_name+, +handler+ +position+ This methods adds a callback that will be called whenever the given event occurs. <<example-2,ex 2>> |