Update Plugins

Ceda EI 2019-02-24 16:37:16 +05:30
parent aa471cdcc5
commit 82c1c73694
1 changed files with 13 additions and 0 deletions

@ -14,3 +14,16 @@
+ [Tmux](plugins/tmux)
+ [Username](plugins/username)
+ [vcs](plugins/vcs)
# How to create new plugin
Themes need to define the following functions
> Note: Replace `plugin_name` with actual plugin name
+ `wish_plugin_name_set_colors` - This function is called after the theme. This allows the plugin to override the theme or set defaults if the theme has not themed some elements of the plugin. Although plugins are allowed to override themes, it is not recommended.
+ `wish_plugin_name_start` - This function should return 0 or 1 if it allows/disallows powerline before it respectively.
+ `wish_plugin_name_end` - This function should return 0 or 1 if it allows/disallows powerline before it respectively.
+ `wish_plugin_name_main` - This function is called every time a prompt is generated. Ensure to run `wish_append bg_color fg_color text` within this function. Although the plugin can override the theme while running `wish_append`, it is not recommended.
Check [dummy plugin](https://gitlab.com/ceda_ei/wish/blob/master/plugins/dummy.sh).