में टर्मिनल आइकन निकालें मैं खोल में नोटिफिकेशन दिखाने के लिए https://github.com/mikaelbr/node-notifier पैकेज का उपयोग कर रहा हूं। आप एक टर्मिनल आइकन नाम से पहले आ रहा है देख सकते हैंनोड नोटिफ़ायर
:
var notifier = require('node-notifier');
var path = require('path');
notifier.notify({
title: 'My awesome title',
message: 'Hello from node, Mr. User!',
icon: path.join(__dirname, 'coulson.jpg'), // absolute path (not balloons)
sound: true, // Only Notification Center or Windows Toasters
wait: true // wait with callback until user action is taken on notification
}, function (err, response) {
// response is response from notification
});
notifier.on('click', function (notifierObject, options) {
// Happens if `wait: true` and user clicks notification
});
notifier.on('timeout', function (notifierObject, options) {
// Happens if `wait: true` and notification closes
});
अधिसूचना इस तरह आता है:
यह मेरा कोड है।
क्या आप मेरी मदद कर सकते हैं कि उस आइकन को कैसे निकालें?
यह सही है। लेकिन ध्यान रखें, अधिसूचना समाप्त होने की प्रतीक्षा करने के लिए विकल्प जोड़ने के लिए नोड-नोटिफ़ायर टर्मिनल-नोटिफ़ायर (https://github.com/mikaelbr/terminal-notifier) का एक कांटा उपयोग करता है, इसलिए इसका उपयोग अपना आइकन जोड़ने के लिए किया जाना चाहिए । ऐसा करने का एक आसान तरीका विक्रेता-फ़ोल्डर से प्रतिलिपि बनाना/पेस्ट करना और अपने स्वयं के विक्रेता को इंगित करने के लिए 'कस्टमपाथ' का उपयोग करना है। – mikaelb
@mikaelb धन्यवाद। मैंने आपकी टिप्पणी को उत्तर में शामिल किया है, इसलिए यह खो नहीं जाएगा। –