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

No configuration file option equivalent to NOTI_DEFAULT #78

Open
AlekSi opened this issue Apr 18, 2018 · 1 comment
Open

No configuration file option equivalent to NOTI_DEFAULT #78

AlekSi opened this issue Apr 18, 2018 · 1 comment

Comments

@AlekSi
Copy link
Contributor

AlekSi commented Apr 18, 2018

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
Copy link

jltml commented Jun 7, 2024

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!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants