Skip to content

Run a custom scripts on certain event #59

@hluk

Description

@hluk

Events to consider:

  • application start (implemented in 6d78b20),
  • application exit (implemented in 6d78b20),
  • open a tab,
  • close a tab,
  • new tab,
  • remove tab,
  • item added to a tab,
  • item removed from a tab,
  • clipboard changed (already implemented as automatic commands).

Script should receive type of event and some additional parameters like tab name, item content etc.

Could be added to configuration Commands tab, i.e. instead of running command just on new item in clipboard, it could be possible to run on certain event.

New function sleep(interval) can be useful. (Already implemented.)

Example commands:

  • clean a tab on exit,
  • populate a tab with items on application start,
  • limit number of items in tab when item is added,
  • put item to "trash" tab if it is removed from a tab.

Edit: This can be now easily implemented add script functions for each event and using the new script commands to override the functions. Performance will hopefully not suffer too much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions