Skip to content

Conversation

cipi1965
Copy link
Contributor

@cipi1965 cipi1965 commented Jul 29, 2020

This PR implements:

  • A new double tap trigger
  • A new triple tap trigger
  • Support for multiple actions and same trigger (just define multiple actions with same trigger type)
  • A brand new actions parameter in config. Example:
{
      "type": "staticButton",
      "title": "test",
      "actions": [
          {
              "trigger": "singleTap",
              "action": "shellScript",
              "executablePath": "/usr/bin/say",
              "shellArguments": ["Single"]
          },
          {
              "trigger": "doubleTap",
              "action": "shellScript",
              "executablePath": "/usr/bin/say",
              "shellArguments": ["Double"]
          },
          {
              "trigger": "longTap",
              "action": "shellScript",
              "executablePath": "/usr/bin/say",
              "shellArguments": ["Long"]
          }
      ]
  }
  • Old action and longAction works normally, i retained the legacy code to not break compatibility.

@cipi1965 cipi1965 changed the title Implement double tap [WIP] Implement double tap Jul 30, 2020
@cipi1965 cipi1965 changed the title [WIP] Implement double tap Implement double tap Jul 30, 2020
Copy link
Collaborator

@ReDetection ReDetection left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@cipi1965 cipi1965 changed the title Implement double tap Implement multiple actions (double tap, triple tap) Aug 1, 2020
@Toxblh
Copy link
Owner

Toxblh commented Aug 1, 2020

LGTM too. Just small request, please, could you add inforation and to Readme as well? How to use it for people :)
Thank you for you PR

@cipi1965
Copy link
Contributor Author

cipi1965 commented Aug 2, 2020

LGTM too. Just small request, please, could you add inforation and to Readme as well? How to use it for people :)

Thank you for you PR

Of course!

@cipi1965
Copy link
Contributor Author

cipi1965 commented Aug 2, 2020

@Toxblh and @ReDetection could you please review latest changes? I updated README and slightly changed the code to support multiple actions for the same trigger

@cipi1965 cipi1965 requested a review from ReDetection August 2, 2020 13:16
@Toxblh Toxblh merged commit 588e6ae into Toxblh:master Aug 3, 2020
@cipi1965 cipi1965 deleted the implement-double-tap branch August 5, 2020 09:52
tomeresk pushed a commit to tomeresk/MTMR that referenced this pull request Jul 16, 2021
* Implement double tap and new actions array in config

* Update native widgets to use new actions parameter

* Refactor new actions parameter moving it to main definition
Renamed old action and longAction to legacy

* Fix tests

* Remove unused code

* Readd test for legacyAction

* Implement triple tap

* Add new actions explanation

* Add support for multiple actions and same trigger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants