Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modular Triggers #62

Open
maltfield opened this issue Jan 22, 2023 · 1 comment
Open

Modular Triggers #62

maltfield opened this issue Jan 22, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@maltfield
Copy link
Member

maltfield commented Jan 22, 2023

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:

  1. A Name
  2. A short description of what it does
  3. If it requires root to execute
  4. Supported Platforms
  5. Author Name & Contact Info
  6. Link to repo with source code
  7. (maybe) arguments accepted (eg sleep time in milliseconds)
  8. 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.

@maltfield
Copy link
Member Author

TODO: Check how popular programs with "addons" or "extensions" declare metadata in their plugins. For example:

  1. Wordpress
  2. Mozilla Firefox/Thunderbird
  3. Chromium

@maltfield maltfield added the enhancement New feature or request label Jan 22, 2023
maltfield added a commit that referenced this issue Jun 10, 2023
 * https://kivy.org/doc/stable/api-kivy.uix.settings.html#create-a-panel-from-json

As I cleanup and remove chunks of code that probably aren't necessary, I want to make sure that I don't break functionality with the other built-in kivy types. Currently we're only using my custom "ComplexOption", but I may want to use some of these in the future.

For example, to set auxiliary triggers, I may want to use the "path" type, which allows the user to pick a file on their computer (eg a script) to execute when the trigger executes

 * #62

So far I tested all of these and they seem to work. There was an additional "Color" picker type, but that failed with an error. Maybe I have too old a version of kivy, but I'm content if our app doesn't allow users to pick colors for now..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant