ueffel / Keypirinha-Plugin-Kill

Provides a command to kill a running processes.
MIT License
25 stars 0 forks source link

Lazy init of the processes list from on_suggest #10

Closed polyvertex closed 7 years ago

polyvertex commented 7 years ago

As a user I'm not keen of having a plugin that performs its init task each time I fire KP.

The simplest way to avoid that is probably to lazy-init the list only when the Kill item has been selected (this patch). Admittedly this may become subject to debate if one use this plugin a lot because of the small delay it implies during the on_suggestion step. In which case we can consider adding a setting on the top of this patch that allows the processes list to be init from the on_activated method. What do you think?

edit: note that, if at all, you may want to merge PR #9 first