Modular Triggers
This ticket will track the effort to redesign the BusKill app's trigger selector from "choose one trigger" to "choose which triggers you'd like to execute and in what order"
All triggers (including the lock-screen & soft-shutdown triggers that we ship out-of-the-box with BusKill) should be python files that live in a triggers subdirectory of the buskill DATA_DIR directory. Each trigger should declare some metadata about itself, such as:
- A Name
- A short description of what it does
- If it requires root to execute
- Supported Platforms
- Author Name & Contact Info
- Link to repo with source code
- (maybe) arguments accepted (eg sleep time in milliseconds)
- etc
In the GUI, the user should be able "add" triggers to a list of triggers that are executed in-order and reorder them. This, for example, would allow a user to lock the screen first, then unmount some encrypted drive, then query some website to initiate some cloud-based duress sequence, then shutdown the computer.
TODO: Check how popular programs with "addons" or "extensions" declare metadata in their plugins. For example:
- Wordpress
- Mozilla Firefox/Thunderbird
- Chromium