variadico / noti

Monitor a process and trigger a notification.
MIT License
4.61k stars 135 forks source link

No configuration file option equivalent to NOTI_DEFAULT #78

Open AlekSi opened 6 years ago

AlekSi commented 6 years ago

There is no configuration file option equivalent to NOTI_DEFAULT environment variable. This requires user like me to pass more command-line flags, especially on servers, where dbus is not installed, and --banner=false flag is required.

jltml commented 5 months ago

For anyone else who ends up at this issue (six years later haha), I think I was able to override the default behavior of sending a banner notification by adding the following to my noti.yaml file:

defaults:
  - pushover

Just swap pushover out for whatever service(s) you'd like to use.

I'm running noti on a server, and previously, I'd been getting the error notify: The name org.freedesktop.Notifications was not provided by any .service files. I no longer get that error, and Pushover successfully delivers my notifications.

I've never written Go before, but from reading config.go, it looks like there is a map (i.e. a hash/dictionary) of default config values which is then merged with the values pulled in from environment variables and the noti.yaml config file, which (I'm guessing) is why this works.

(By the way, to the author of this project — thanks for writing Noti; it's awesome!)