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

Adding global pronounce to custom.js makes serenade unresponsive #49

Open
bryandandan opened this issue Sep 30, 2023 · 1 comment
Open

Comments

@bryandandan
Copy link

I have a big custom.js that works like a charm. As soon as I add a simple global pronounce, Serenade stops detecting the window I am on and becomes not responsive. This is the beginning of my code

/* Serenade Custom Commands

In this file, you can define your own custom commands with the Serenade API.

For instance, here's a custom automation that opens your terminal and runs a command:

serenade.global().command("make", api => {
  api.focusApplication("terminal");
  api.typeText("make clean && make");
  api.pressKey("return");
});

And, here's a Python snippet for creating a test method:

serenade.language("python").snippet(
  "test method <%identifier%>",
  "def test_<%identifier%>(self):<%newline%><%indent%>pass",
  { "identifier": ["underscores"] }
  "method"
);

For more information, check out the Serenade API documentation: https://serenade.ai/docs/api

*/

serenade.global().pronounce('colon', 'column')

serenade
  .language('css')
  .snippet(
    'container',
    '.container {<%newline%><%indent%><%cursor%><%newline%>}',
    null,
    'inline'
  )

Why is this happening? Also, this is a screenshot of Serenade showing it does not recognize any of my opened apps (code, chrome...etc)

image

@MooersLab
Copy link

MooersLab commented May 9, 2024

I ran into the same problem with the pronounce command on a Mac running Ventura 13.6.6. I tried to move the pronounce commands to a separate js file. I also tried adding a semicolon at the end of the command.

What is the syntax are an alternate command for doing text replacements globally?

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

No branches or pull requests

2 participants