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

ignored_commands.txt and don't show again button #65

Open
stepanzak opened this issue Jul 26, 2024 · 1 comment
Open

ignored_commands.txt and don't show again button #65

stepanzak opened this issue Jul 26, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@stepanzak
Copy link

stepanzak commented Jul 26, 2024

Hi, it would be great if this plugin could read list of ignored commands from a file like ignored_commands.txt, with each ignored command on a new line.
It would then be super easy to add a button on each zsh-auto-notify notification that would do echo %command>>ignored_commands.txt
Most notification daemons support buttons out of the box.
This might not seem like much, but it's a much better workflow than adding the ignored commands to variable in the config file - There are many commands you want to ignore, but it's impossible to remember all of them when writing the config. Adding each command to the config as you get the notification is even more annoying.
This solution would be very quick and user friendly and satisfying - clicking on Don't show again for this command makes up for the annoying notification after exiting neovim.

@stepanzak
Copy link
Author

Hi, I opened PR for the file-reading part, but notifications with buttons seems to be more complex.
Turns out I can't just tell notify-send which command to execute on button click. I can only tell it codename of the button and it will print that codename into standard output when user clicks on that button.
The best way to do that is in my opinion executing the notify-send command from another script, that then waits until notify-send finishes and based on it's output writes to the auto-notify-ignored.txt or not. Notify-send could theoretically run for hours if the user for example keeps hovering over the notification with mouse. That means the zsh script could also run for hours, which I think isn't optimal for the main script.
Is it ok to try moving the part executing notify-send to separate script?

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