Search code examples
node.jsmacososascript

mac display-notification's icon


I write in nodejs

    var exec = require('child_process').exec;
    var pwd = 'osascript -e \'display notification "'+path.basename(des)+'" with title "'+ name + time +'"\''
    exec(pwd, function (error, stdout, stderr) {
    })

It comes likes enter image description here

How could it be like enter image description here

Question :

How can i change the icon display on left?


Solution

  • There's already an answer for this on AskDifferent.

    As of the Apple Documentation display notification does not have a parameter to change te icon.

    display notification will use the icon of your script. One of your option is to change the icon of your bundle (cf screen).

    enter image description here