Skip to content

disable button while command is running #6

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

Open
lianghongzhuo opened this issue Sep 30, 2024 · 5 comments
Open

disable button while command is running #6

lianghongzhuo opened this issue Sep 30, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@lianghongzhuo
Copy link
Member

lianghongzhuo commented Sep 30, 2024

Make the button grey (disable) while the command is running

@v4hn v4hn added the enhancement New feature or request label Sep 30, 2024
@v4hn v4hn changed the title Feature request disable button while command is running Sep 30, 2024
@v4hn
Copy link
Member

v4hn commented Sep 30, 2024

For a lot of my use-cases that doesn't really make sense because the script will only publish a message to trigger something and will not wait. How about a simple solution to disable the button for 3s or something similar? I guess you want some immediate feedback on button click to avoid clicking multiple times.

@lianghongzhuo
Copy link
Member Author

lianghongzhuo commented Sep 30, 2024

For a lot of my use-cases that doesn't really make sense because the script will only publish a message to trigger something and will not wait. How about a simple solution to disable the button for 3s or something similar? I guess you want some immediate feedback on button click to avoid clicking multiple times.

Then, I think you can sleep for whatever seconds on your bash script and then return.
But my usecase will only return when the command was finished. In this way you can control how many seconds you want to wait for each script.

@lianghongzhuo
Copy link
Member Author

maybe address #5 first

@v4hn
Copy link
Member

v4hn commented Oct 1, 2024

But my usecase will only return when the command was finished. In this way you can control how many seconds you want to wait for each script.

Please provide a clean patch if you are interested in your behavior.
I'm not sure how to implement it without monitoring the forked process, which would break support for keep_open.

Providing a 3 second cool down was my suggestion for a less cumbersome alternative.

@lianghongzhuo
Copy link
Member Author

But my usecase will only return when the command was finished. In this way you can control how many seconds you want to wait for each script.

Please provide a clean patch if you are interested in your behavior. I'm not sure how to implement it without monitoring the forked process, which would break support for keep_open.

Providing a 3 second cool down was my suggestion for a less cumbersome alternative.

If this is the case, I am also going with the 3-second cooling suggestion, or maybe setting it in the config how many seconds to set.

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

2 participants