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
Trigger: Window shown #702
Comments
I have implemented a new "Window shown" trigger, which works well. I elected not to do the same for "Window hidden", as I can't really see the use case after thinking it through. |
Doesn't seem to work @ 2.2.0. Tried it with Also using titles like Staring a windows terminal worked to trigger the recipe for a few times. Then it stopped. I also launch a few terminals using a simple batch script. The first terminal will benefit from the recipe (move). The others won't. {
"enabled": true,
"name": "terminal auto resize",
"id": null,
"triggers": [
{
"type": "window:shown",
"Window": "\\windowsterminal*\\\\"
}
],
"ingredients": [
{
"command": "window:move",
"parameters": {
"region": "95%,50%",
"window": "\\\\\\"
}
}
]
} |
Hi there, when trying to reproduce this in version 2.2.1; the following recipe works: {
"enabled": true,
"name": "Auto-resize Terminal",
"id": null,
"triggers": [
{
"type": "window:shown",
"Window": "\\WindowsTerminal\\\\"
}
],
"ingredients": [
{
"command": "window:move",
"parameters": {
"region": "center left"
}
}
]
} The only real difference I can see to your recipe, is that I've removed the window parameter to the command. |
Currently using this and it's working too:
Your recipe works too. But the problem still exists if you start multiple terminals using a batch script (guess that will happen with all programs):
But... message "prevent infinite loops" get's fired. |
Thanks for the feedback on this. The infinite loops message is a bit annoying, but necessary. It shouldn't trigger in your case though, as it should allow 10 executions before triggering (you are spot on with the timeout, though, it is 2 seconds). If you can reliably reproduce this with the above recipe and batch scripts, let me know, and I will take a closer look. |
Describe the solution you'd like
It should be possible to trigger recipes based on when windows are shown or hidden. "Window opened" (which should really be "Window created") does not trigger if the window is created hidden and then shown later.
Additional context
E.g. Notepad does not trigger the "Window opened" trigger today, as the window is created invisible, and then shown later.
The text was updated successfully, but these errors were encountered: