A hook into macOS's notification center, to run a script when a notification sent.
With homebrew:
brew install who23/formulae/nchook
Start the nchook daemon with brew services start nchook
Create or symlink an executable file at ~/.config/nchook/nchook_script
. This script will
be run as nchook_script APP TITLE BODY TIME
. Note that TIME is a unix timestamp in
seconds.