Giter VIP home page Giter VIP logo

Comments (6)

lpil avatar lpil commented on May 18, 2024

Currently there is no mechanism for this. How does one create an OSX notification?

from mix-test.watch.

michaelforrest avatar michaelforrest commented on May 18, 2024

There's a terminal-notifier command. Even if you could just provide a hook or some configuration so that I could hook it in myself that would be a help.

terminal-notifier (1.6.3) is a command-line tool to send OS X User Notifications.

Usage: terminal-notifier -[message|list|remove] [VALUE|ID|ID] [options]

   Either of these is required (unless message data is piped to the tool):

       -help              Display this help banner.
       -message VALUE     The notification message.
       -remove ID         Removes a notification with the specified ‘group’ ID.
       -list ID           If the specified ‘group’ ID exists show when it was delivered,
                          or use ‘ALL’ as ID to see all notifications.
                          The output is a tab-separated list.

   Optional:

       -title VALUE       The notification title. Defaults to ‘Terminal’.
       -subtitle VALUE    The notification subtitle.
       -sound NAME        The name of a sound to play when the notification appears. The names are listed
                          in Sound Preferences. Use 'default' for the default notification sound.
       -group ID          A string which identifies the group the notifications belong to.
                          Old notifications with the same ID will be removed.
       -activate ID       The bundle identifier of the application to activate when the user clicks the notification.
       -sender ID         The bundle identifier of the application that should be shown as the sender, including its icon.
       -appIcon URL       The URL of a image to display instead of the application icon (Mavericks+ only)
       -contentImage URL  The URL of a image to display attached to the notification (Mavericks+ only)
       -open URL          The URL of a resource to open when the user clicks the notification.
       -execute COMMAND   A shell command to perform when the user clicks the notification.

When the user activates a notification, the results are logged to the system logs.
Use Console.app to view these logs.

Note that in some circumstances the first character of a message has to be escaped in order to be recognized.
An example of this is when using an open bracket, which has to be escaped like so: ‘\[’.

For more information see https://github.com/alloy/terminal-notifier.

╰─$ terminal-notifier -message "HELLO"                                                                                                              1 ↵

from mix-test.watch.

lpil avatar lpil commented on May 18, 2024

I'd like to have this as a plugin. One question is how does one tell whether exunit passed or not. Time to do some digging I guess.

from mix-test.watch.

illiatdesdindes avatar illiatdesdindes commented on May 18, 2024

there's a hex dependency that do exactly what your looking for:
https://github.com/navinpeiris/ex_unit_notifier

Show desktop notifications for ExUnit runs. Works very well with automatic test runners such as mix-test.watch.

Maybe a mention in the Readme would be wlecomed ? 😃

from mix-test.watch.

michaelforrest avatar michaelforrest commented on May 18, 2024

Perfect, thank you!

from mix-test.watch.

lpil avatar lpil commented on May 18, 2024

How handy! If you'd like to make a note of this in the README I'd be happy to merge it in.

from mix-test.watch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.