mikaelbr/gulp-notify

Possible to disable via environment variable?

Closed this issue · 5 comments

These notifications are ridiculously unusable on Linux systems running Gnome Shell, where they cause the pop-up indicator to bounce around incessantly. Those of us who don't wish to see these notifications should be able to easily disable them by dropping a line into our environment configuration.

Hi and thanks for taking the time to write the issue! I'll look into how to make the notifications better for GNOME, but my first response is that this isn't to much a problem with the module itself, but rather how it is used. You can easily add a conditional using something like gulp-if.

Also, if the problem is too many notifications, you should look into how and where the notifications are used and re-evaluate if they are used right and possible if the "onLast" flag should be used.

Hope this helps some.

@mikaelbr yep, it's more to do with the awful implementation of notifications within Gnome Shell to be honest. Although ideally developers wouldn't notify all the things, in the interests of pragmatism it'd be ideal if there were a way of either rate limiting or entirely disabling notifications, e.g.:

NOTIFY=never gulp watch

Hi again and sorry for the late response!

I've been thinking about this some, and don't feel that env is the way to go. In gulp, you have the concept of --silent where as if you run

gulp someTask --silent

logging will be disabled. Thinking doing something like this will be more in thread with gulp.
I don't think we can really use --silent as that is for logging in the terminal, but something similar along the lines of --no-notify? Let me know what you think!

Sorry it took so long. I've been thinking some about this and decided that it would be "noisy" to have the user always type -silent. I implemented the DISABLE_NOTIFIER variable.

You can now do:

export DISABLE_NOTIFIER=true

and run

$ gulp

and you shouldn't see any notifications!

Fantastic -- this is ideal for our staging deployments where notify-send isn't installed and for working around overly noisey use of the plugin. Thank you!