{"id":14062801,"url":"https://github.com/Aetherinox/node-toasted-notifier","last_synced_at":"2025-07-29T14:31:46.653Z","repository":{"id":247775621,"uuid":"826784326","full_name":"Aetherinox/toasted-notifier","owner":"Aetherinox","description":"A revised fork of node-notifier; NodeJS package for pushing notifications to MacOS, Linux, and Windows.","archived":false,"fork":false,"pushed_at":"2024-11-13T00:54:40.000Z","size":7898,"stargazers_count":7,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-28T06:41:57.679Z","etag":null,"topics":["node","node-js","node-notificiation","node-notifier","nodejs","notification","notifications","ntfy","ntfy-desktop","ntfy-sh","ntfysh","push-notification","push-notifications"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aetherinox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://buymeacoffee.com/aetherinox"],"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null}},"created_at":"2024-07-10T11:21:42.000Z","updated_at":"2024-11-13T00:54:44.000Z","dependencies_parsed_at":"2024-07-11T20:52:27.187Z","dependency_job_id":"b556cf63-5adb-4738-8fda-548b9924cff9","html_url":"https://github.com/Aetherinox/toasted-notifier","commit_stats":null,"previous_names":["aetherinox/node-toasted","aetherinox/ntfy-toast-node"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aetherinox%2Ftoasted-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aetherinox%2Ftoasted-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aetherinox%2Ftoasted-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aetherinox%2Ftoasted-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aetherinox","download_url":"https://codeload.github.com/Aetherinox/toasted-notifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228022765,"owners_count":17857593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["node","node-js","node-notificiation","node-notifier","nodejs","notification","notifications","ntfy","ntfy-desktop","ntfy-sh","ntfysh","push-notification","push-notifications"],"created_at":"2024-08-13T07:02:29.164Z","updated_at":"2025-07-29T14:31:46.634Z","avatar_url":"https://github.com/Aetherinox.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003e♾️ Toasted Notifier ♾️\u003c/h1\u003e\n\u003cbr /\u003e\n\n\u003cp\u003e\n\n**Toasted Notifier** is a forked version of [node-notifier](https://github.com/mikaelbr/node-notifier) which has been updated with various changes. It allows for you to display push notifications within your application for Windows, Linux, and macOS. \n\n\u003cbr /\u003e\n\nThis library is packaged with [ntfy-desktop](https://github.com/Aetherinox/ntfy-desktop)\n\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003c!-- prettier-ignore-start --\u003e\n[![Version][badge-version-gh]][link-version-gh] \n[![Build Status][badge-build]][link-build] \n[![Downloads][badge-downloads-gh]][link-downloads-gh] \n[![Size][badge-size-gh]][badge-size-gh] \n[![Last Commit][badge-commit]][badge-commit]\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://github.com/Aetherinox/toasted-notifier/assets/118329232/8ed8330f-2f1f-43e1-9264-cb5ead9314f0\" width=\"630\"\u003e\n\n\u003cbr /\u003e\n\n\u003cimg src=\"https://github.com/Aetherinox/toasted-notifier/assets/118329232/ca453129-bf45-4b92-9979-447219b7df02\" width=\"630\"\u003e\n\n\u003cbr /\u003e\n\n\u003cimg src=\"https://github.com/Aetherinox/toasted-notifier/assets/118329232/f2ec9a0f-07f0-4cef-b791-99cf97a9fa39\" width=\"630\"\u003e\n\n\u003c/div\u003e\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n- [About](#about)\n  - [What is ntfy-toast](#what-is-ntfy-toast)\n- [Features](#features)\n- [Install](#install)\n- [Usage](#usage)\n  - [Cross-Platform Advanced Usage](#cross-platform-advanced-usage)\n  - [Fine-grained Control](#fine-grained-control)\n  - [Specific Vendor Documentation](#specific-vendor-documentation)\n    - [NotificationCenter](#notificationcenter)\n      - [Sounds](#sounds)\n      - [Custom Path](#custom-path)\n      - [Spotlight](#spotlight)\n    - [WindowsToaster](#windowstoaster)\n      - [Notifications Not Working](#notifications-not-working)\n      - [Windows 10 Fall Creators Update (Version 1709):](#windows-10-fall-creators-update-version-1709)\n    - [Growl](#growl)\n    - [WindowsBalloon](#windowsballoon)\n    - [NotifySend](#notifysend)\n  - [appID support](#appid-support)\n    - [Create App Shortcut](#create-app-shortcut)\n    - [Call App](#call-app)\n- [Help](#help)\n  - [How to change text `NtfyToast` at the top of notifications](#how-to-change-text-ntfytoast-at-the-top-of-notifications)\n  - [Can't use Windows Toast notifications in WSL2](#cant-use-windows-toast-notifications-in-wsl2)\n  - [Distributing with Electron](#distributing-with-electron)\n  - [Using Webpack](#using-webpack)\n  - [Windows: Where are files / .lnk files placed](#windows-where-are-files--lnk-files-placed)\n  - [Header icon broken / missing / default](#header-icon-broken--missing--default)\n  - [Usage in tmux session](#usage-in-tmux-session)\n\n\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n# About\n\nToasted Notifier allows you to send cross platform native notifications using Node.js, and works well with Electron.\n\n\u003cbr /\u003e\n\nThis node package `toasted-notifier` contains a combination of supported notification vendors, which allows a user on any operating system to use this package in their application. The following list shows all of the notification vendors this package supports, which operating system it is for, and the filename for where the code belonging to that notification system can be found in this package:\n\n| Notification API | Operating System | File | View Docs |\n| --- | --- | --- | --- |\n| **WindowToaster** | `Windows 8, 10, and 11` | `notifiers\\toaster.js` | [view](#windowstoaster) |\n| **WindowsBalloon** | `Windows XP / 7` | `notifiers\\balloon.js` | [view](#windowsballoon) |\n| **NotifySend** | `Linux` | `notifiers\\notifysend.js` | [view](#notifysend) |\n| **NotificationCenter** | `macOS / OS X` | `notifiers\\notificationcenter.js` | [view](#notificationcenter) |\n| **Growl** | `macOS / OS X`, `Windows` | `notifiers\\growl.js` | [view](#growl) |\n\n\u003cbr /\u003e\n\nWhen you include `toasted-notifier` in your node project, the API will automatically detect what operating system you are running your application on. Depending on the operating system, Toasted Notifier will call the correct notification package that it will use to show your coded notifications. The following outlines how the package acts and what it takes into consideration:\n\n- [NotificationCenter](#notificationcenter): macOS\n  - This package will be used if you are running on macOS \u003e= 10.8 or newer.\n  - If running on an older version of macOS, [Growl](#growl) will be used instead.\n  - Messages sent using `terminal-notify`\n- [NotifySend](#notifysend): Linux / Unix\n  - Notifications will be shown using `notify-osd` or `libnotify-bin`; which must be installed on your Linux system.\n  - Ubuntu should have one of these packages by default\n- [WindowToaster](#windowstoaster): Microsoft Windows 8, 9, 10, 11+\n- [WindowsBalloon](#windowsballoon): Windows XP, 7\n  - [Growl](#growl) as fallback if Windows Balloon notifications cannot be called\n  - [Growl](#growl) takes precedence over [Windows balloons](#windowsballoon)\n- [Growl](#growl): macOS, Windows\n  - This notification system is called if none of the requirements for the other notification vendors are met\n\n\u003cbr /\u003e\n\n## What is ntfy-toast\n\nThis node package `toasted-notifier` utilizes a custom built library known as [ntfy-toast](https://github.com/Aetherinox/ntfy-toast) in order to show notifications on a user's system.\n\nWhen you add this node package to your application and send a notification, data will be sent from this node package `toasted-notifier` over to [ntfy-toast](https://github.com/Aetherinox/ntfy-toast) with the details about what the notification should say to the user. Think of `toasted-notifier` as a wrapper that handles the communication between your app, and the notification app itself. `toasted-notifier` will do all of the talking between your app and [ntfy-toast](https://github.com/Aetherinox/ntfy-toast) each time a notification is triggered to be sent.\n\n[ntfy-toast](https://github.com/Aetherinox/ntfy-toast) is based on [SnoreToast](https://github.com/KDE/snoretoast), but has been updated with numerous new features.\n\n\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n# Features\n\n- Notification support for Windows XP - 11, Linux, and MacOS.\n- Windows custom appID support for branding\n- Persistent notifications keep a message on-screen until the user dismisses it\n- No change in code if coming over from [node-notifier](https://github.com/mikaelbr/node-notifier)\n- Customize sounds and icons\n\n\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n# Install\n\nSimply install it using:\n\n```shell\nnpm install --save toasted-notifier\n```\n\n\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n# Usage\n\nInformation and examples for implementing notifications:\n\n\u003cbr /\u003e\n\n\u003e [!NOTE]\n\u003e We have provided numerous written examples that you can view by going to the **example** folder of our repo:\n\u003e - https://github.com/Aetherinox/node-toasted-notifier/tree/main/example\n\n\u003cbr /\u003e\n\n## Cross-Platform Advanced Usage\n\nIf you wish to ensure that your node application supports all operating systems, _(Windows, Linux, Mac)_, you can use the following javascript as an example to build your notifications around:\n\n```javascript\nconst toasted = require('toasted-notifier');\nconst path = require('path');\n\ntoasted.notify(\n    {\n        title: 'Notification Title',\n        message: 'This is a message',\n        icon: path.join(__dirname, 'example_1.png'),    // Absolute path (doesn't work on balloons)\n        sound: true,                                    // Only Notification Center or Windows Toasters\n        wait: true                                      // Wait on callback until user interacts, does not apply to Windows Toasters as they always wait or notify-send as it does not support the wait option\n    },\n    ( error, response, metadata ) =\u003e\n    {\n        // Response is response from notification\n        // Metadata contains activationType, activationAt, deliveredAt\n    }\n);\n\ntoasted.on('click', function (obj, options, event) {\n    // Triggers if `wait: true` and user clicks notification\n});\n\ntoasted.on('timeout', function (obj, options) {\n    // Triggers if `wait: true` and notification closes\n});\n```\n\n\u003cbr /\u003e\n\n## Fine-grained Control\n\nIf you want super fine-grained control for each vendor; you can call them individually. This allows you to tune specific options for the different vendors.\n\nSee below for documentation on each notification vendor.\n\n```javascript\n/*\n    create option structure\n*/\n\nconst options =\n{\n    withFallback: true,       // try Windows Toast and Growl first?\n    customPath: undefined     // relative / absolute path if you want to use your own fork\n};\n\n/*\n    send notification to users running macOS 10.8 or newer\n*/\n\nconst NotificationCenter = require('toasted-notifier/notifiers/notificationcenter');\nnew NotificationCenter(options).notify();\n\n/*\n    send notification to users running Linux\n*/\n\nconst NotifySend = require('toasted-notifier/notifiers/notifysend');\nnew NotifySend(options).notify();\n\n/*\n    send notification to users running Windows 8, 10, 11\n*/\n\nconst WindowsToaster = require('toasted-notifier/notifiers/toaster');\nnew WindowsToaster(options).notify();\n\n/*\n    send notification to users running Windows XP or 7\n*/\n\nconst WindowsBalloon = require('toasted-notifier/notifiers/balloon');\nnew WindowsBalloon(options).notify();\n\n/*\n    send notification to users running Windows or macOS\n    this is the fallback used if the above notification vendors aren't available.\n*/\n\nconst Growl = require('toasted-notifier/notifiers/growl');\nnew Growl(options).notify();\n```\n\n\u003cbr /\u003e\n\nIf you're using several vendors:\n\n```javascript\n// NOTE: Technically, this takes longer to require\nconst tn = require('toasted-notifier');\n\nnew tn.NotificationCenter(options).notify();\nnew tn.NotifySend(options).notify();\nnew tn.WindowsToaster(options).notify(options);\nnew tn.WindowsBalloon(options).notify(options);\nnew tn.Growl(options).notify(options);\n```\n\n\u003cbr /\u003e\n\n## Specific Vendor Documentation\n\nTo see information about each specific vendor and operating system, select one below:\n\n---\n\nThe following different types of notifications are listed below:\n\n| Notification API | Operating System | File | View Docs |\n| --- | --- | --- | --- |\n| **WindowToaster** | `Windows 8, 10, and 11` | `notifiers\\toaster.js` | [view](#windowstoaster) |\n| **WindowsBalloon** | `Windows XP / 7` | `notifiers\\balloon.js` | [view](#windowsballoon) |\n| **NotifySend** | `Linux` | `notifiers\\notifysend.js` | [view](#notifysend) |\n| **NotificationCenter** | `macOS / OS X` | `notifiers\\notificationcenter.js` | [view](#notificationcenter) |\n| **Growl** | `macOS / OS X` | `notifiers\\growl.js` | [view](#growl) |\n\n---\n\n\u003cbr /\u003e\n\n### NotificationCenter\n\n- A Node.js wrapper for terminal-notify (with fallback).\n- Code available at: `node_modules\\toasted-notifier\\notifiers\\notificationcenter.js`\n- Requires macOS version 10.8 or higher; otherwise the fallback is [Growl](#growl). If growl is not installed, an error will be returned in the callback.\n\n\u003cbr /\u003e\n\nSince `toasted-notifier` wraps around `terminal-notifier`, you can do anything terminal-notifier can by passing properties to the method.\n\n- if `terminal-notifier` says `-message`, you can do `{message: 'Foo'}`\n- if `terminal-notifier` says `-list ALL`, you can do `{list: 'ALL'}`\n\n\u003cbr /\u003e\n\nNotification is the primary focus of this module, so listing and activating do work, but they aren't documented.\n\n\u003cbr /\u003e\n\n```javascript\nconst NotificationCenter = require('toasted-notifier').NotificationCenter;\n\nconst toasted = new NotificationCenter(\n{\n    withFallback: false,        // Use Growl Fallback if \u003c= 10.8\n    customPath: undefined       // Relative/Absolute path to binary if you want to use your own fork of terminal-notifier\n});\n\ntoasted.notify(\n    {\n        title: undefined,\n        subtitle: undefined,\n        message: undefined,\n        sound: false,               // Case Sensitive string for location of sound file, or use one of macOS' native sounds (see below)\n        icon: 'Terminal Icon',      // Absolute Path to Triggering Icon\n        contentImage: undefined,    // Absolute Path to Attached Image (Content Image)\n        open: undefined,            // URL to open on Click\n        wait: false,                // Wait for User Action against Notification or times out. Same as timeout = 5 seconds\n\n        // New in latest version. See `example/macInput.js` for usage\n        timeout: 5,                 // Takes precedence over wait if both are defined.\n        closeLabel: undefined,      // String. Label for cancel button\n        actions: undefined,         // String | Array\u003cString\u003e. Action label or list of labels in case of dropdown\n        dropdownLabel: undefined,   // String. Label to be used if multiple actions\n        reply: false                // Boolean. If notification should take input. Value passed as third argument in callback and event emitter.\n    },\n    ( error, response, metadata ) =\u003e\n    {\n        console.log( response, metadata );\n    }\n);\n```\n\n\u003cbr /\u003e\n\n\u003e [!NOTE]\n\u003e The wait option is shorthand for `timeout: 5`. This just sets a timeout for 5 seconds. It does not make the notification stick until the user interacts with it.\n\u003e \n\u003e **macOS Notifications**: `icon`, `contentImage`, and all forms of `reply`/`actions` require macOS 10.9.\n\n\u003cbr /\u003e\n\nDefault timeout is `10` to ensure that the application closes properly. To remove the timeout and have notifications instantly close _(does not support actions)_, set `timeout: false`. If you are using an `action:` declaration; it is recommended to set the timeout to a high value to ensure the user has time to respond to the notification.\n\n\u003e [!NOTE]\n\u003e **Exception**: If `reply: true` is defined, set timeout to a high value, or to nothing at all.\n\n\u003cbr /\u003e\n\n#### Sounds\n\nWhen specifying a `sound`, you have the following options:\n\n- Basso\n- Blow\n- Bottle\n- Frog\n- Funk\n- Glass\n- Hero\n- Morse\n- Ping\n- Pop\n- Purr\n- Sosumi\n- Submarine\n- Tink\n\n\u003cbr /\u003e\n\nIf `sound: true`, **Bottle** is the default sound.\n\n\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n**See Also:**\n\n- [Example: specific Notification Centers](./example/advanced.js)\n- [Example: input](./example/macInput.js).\n\n\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n#### Custom Path\n\n`customPath` takes a string which can be either a relative or absolute path to the binary of your fork/custom version of terminal-notifier.\n\nExample: `./vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier`\n\n\u003cbr /\u003e\n\n#### Spotlight\n\n`terminal-notifier.app` is located in the `mac.noindex` folder to prevent Spotlight from indexing the app. You can find it in:\n- `toasted-notifier\\vendor\\mac.noindex\\terminal-notifier.app`\n\n\u003cbr /\u003e\n\n### WindowsToaster\n\n- A Node.js wrapper for Windows 8, 10, and 11 notifications.\n- Code available at: `node_modules\\toasted-notifier\\notifiers\\toaster.js`\n\n\u003cbr /\u003e\n\n**Note:** There are limitations for images in native **Windows 8** notifications:\n\n- Image must be a `PNG` image\n- Image must be smaller than `1024×1024px`\n- Image must be less than `200kb`\n- Image must be specified using an `absolute path`\n\nThese limitations are due to the Toast notification system. A good tip is to use something like `path.join` or `path.delimiter` to keep your paths cross-platform.\n\n\u003cbr /\u003e\n\n#### Notifications Not Working\n\nIf you do not see notifications from Toasted-Notifier, click windows **Start** and locate:\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://github.com/Aetherinox/toasted-notifier/assets/118329232/1ed99a6a-f122-42f6-beb7-9c355d6622e2\" width=\"440px\"\u003e\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\nLocate `NtfyToast`, or your `customPath` / `appID` program in the list.\n\n\u003cbr /\u003e\n\n\u003e [!NOTE]\n\u003e \u003ca href=\"https://github.com/Aetherinox/ntfy-toast\"\u003entfy-toast\u003c/a\u003e is the library used by this node package `toasted-notifier` for Windows notifications\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://github.com/Aetherinox/toasted-notifier/assets/118329232/2616ea6e-cde0-4240-8797-e671869dbe83\" width=\"440px\"\u003e\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\nEnable both permissions for `banner` and `sound`:\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://github.com/Aetherinox/toasted-notifier/assets/118329232/4d91a948-2231-4652-ba58-8547bd7ce48d\" width=\"440px\"\u003e\n\n\u003c/div\u003e\n\n\u003c/div\u003e\n\n#### Windows 10 Fall Creators Update (Version 1709):\n\nThis node package utilizes [ntfy-toast](https://github.com/Aetherinox/ntfy-toast) to display native Windows notifications.\n\n\u003cbr /\u003e\n\nBy default when a notification is displayed, the application name at the top of the popup will be `NtfyToast`. The app has an app id which is fed into Toasted-Notifier which is how the notification system knows what application name to show at the top of each notification. The app id is built into each application.\n\n\u003cbr /\u003e\n\nWith the Fall Creators Update, Notifications on Windows 10 will only work as expected if a valid **appID** is specified. The appID must be exactly the same value that was registered during the installation of the app.\n\n\u003cbr /\u003e\n\nIf you wish to have an alternative program name show at the top of each notification, you will need to feed your own app id into the code that calls your notification toasts.\n\n\u003cbr /\u003e\n\nFor a in-depth write-up on how to get the app id for your custom program, read the section [appID support](#appid-support). \n\n\u003cbr /\u003e\n\nYou can attempt to quickly find the `appID` for an application by opening PowerShell and executing the command:\n\n```powershell\nget-StartApps | Where-Object {$_.Name -like '*YourAppName*'}\n```\n\n\u003cbr /\u003e\n\nIn our example, we can run\n\n```powershell\nget-StartApps | Where-Object {$_.Name -like '*Ntfytoast*'}\n```\n\n\u003cbr /\u003e\n\nWhich returns the following:\n\n```console\nName          AppID\n----          -----\nntfytoast     com.ntfytoast.id\n```\n\n\u003cbr /\u003e\n\nYou can also find the ID of your App by searching the registry for the appID you specified at installation of your app. For example: If you use the squirrel framework, your appID would be `com.squirrel.your.app`.\n\n\u003cbr /\u003e\n\nOnce you have found the custom app id you wish to use for notifications; you can provide it when calling a notification, such as with the example below, in which we use `com.ntfytoast.id`:\n\n\u003cbr /\u003e\n\n```javascript\nconst WindowsToaster = require('toasted-notifier').WindowsToaster;\n\nconst toasted = new WindowsToaster(\n{\n    withFallback: false,            // Fallback to Growl or Balloons\n    customPath: undefined           // Relative/Absolute path if you want to use your fork of SnoreToast.exe\n});\n\ntoasted.notify(\n    {\n        title: undefined,           // String           | Required\n        message: undefined,         // String           | Required if remove is not defined\n        icon: undefined,            // String           | Absolute path to Icon\n        sound: false,               // Bool or String   | (as defined by http://msdn.microsoft.com/en-us/library/windows/apps/hh761492.aspx)\n        id: undefined,              // Number           | ID to use for closing notification.\n        appID: 'com.ntfytoast.id',  // String           | App.ID and app Name. Defaults to no value, causing SnoreToast text to be visible.\n        remove: undefined,          // Number           | Refer to previously created notification to close.\n        install: undefined          // String           | \u003cpath, application, app id\u003e |  Creates a shortcut \u003cpath\u003e in the start menu which point to the executable \u003capplication\u003e, appID used for the notifications.\n    },\n    ( error, response ) =\u003e\n    {\n        console.log( response );\n    }\n);\n```\n\n\u003cbr /\u003e\n\nAs stated before, there is a very in-depth write-up on how to set up your custom application and how to obtain the app id by reading the section [appID support](#appid-support).\n\n\u003cbr /\u003e\n\n### Growl\n- A Node.js wrapper for MacOS, also used as a fallback.\n- Code available at: `node_modules\\toasted-notifier\\notifiers\\growl.js`\n- [View Growl Github Repo](https://github.com/theabraham/growly/)\n\n\u003cbr /\u003e\n\n```javascript\nconst Growl = require('toasted-notifier').Growl;\n\nconst toasted = new Growl({\n    name: 'Growl Name Used', // Defaults to 'Node'\n    host: 'localhost',\n    port: 23053\n});\n\ntoasted.notify(\n{\n    title: 'Foo',\n    message: 'My Message',\n    icon: fs.readFileSync(__dirname + '/example_1.png'),\n    wait: true,                     // whether or not to sticky the notification (defaults to false.)\n    label: undefined,               // type of notification to use (defaults to the first registered notification type.)\n    priority: undefined             // the priority of the notification from lowest (-2) to highest (2).\n});\n```\n\n\u003cbr /\u003e\n\n### WindowsBalloon\n\n- A Node.js wrapper for earlier versions of Windows such as Windows XP / 7.\n- Code available at: `node_modules\\toasted-notifier\\notifiers\\balloon.js`\n- Uses the 3rd party library Notifu, located at: `node_modules\\toasted-notifier\\vendor\\notifu`\n  - [View Notifu Project](https://www.paralint.com/projects/notifu/)\n\n\u003cbr /\u003e\n\n```javascript\nconst WindowsBalloon = require('toasted-notifier').WindowsBalloon;\n\nconst toasted = new WindowsBalloon(\n{\n    withFallback: false,    // Try Windows Toast and Growl first?\n    customPath: undefined   // Relative/Absolute path if you want to use your fork of notifu\n});\n\ntoasted.notify(\n    {\n        title: undefined,\n        message: undefined,\n        sound: false,       // true | false.\n        time: 5000,         // How long to show balloon in ms\n        wait: false,        // Wait for User Action against Notification\n        type: 'info'        // The notification type : info | warn | error\n    },\n    ( error, response ) =\u003e\n    {\n        console.log( response );\n    }\n);\n```\n\n\u003cbr /\u003e\n\n### NotifySend\n- A Node.js wrapper for sending notifications to users on Linux\n- Code available at: `node_modules\\toasted-notifier\\notifiers\\notifysend.js`\n\n\u003cbr /\u003e\n\n\u003e [!NOTE]\n\u003e notify-send doesn't support the `wait` flag.\n\u003e See flags and options on the man page [notify-send](https://manpages.ubuntu.com/manpages/oracular/en/man1/notify-send.1.html)\n\n\u003cbr /\u003e\n\n```javascript\nconst NotifySend = require('toasted-notifier').NotifySend;\n\nconst toasted = new NotifySend();\n\ntoasted.notify(\n    {\n        title: 'A Title',\n        message: 'Hello to you',\n        icon: __dirname + '/example_1.png',\n\n        wait: false,        // Defaults no expire time set. If true expire time of 5 seconds is used. not supported by Windows Toasters\n        timeout: 10,        // Alias for expire-time, time etc. Time before notify-send expires. Defaults to 10 seconds.\n\n        // other notify-send flags:\n        'app-name': 'toasted-notifier',\n        urgency: undefined,\n        category: undefined,\n        hint: undefined\n    }\n);\n```\n\n\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n## appID support\n\nWindows Toast notifications will show the name of the application calling the notification at the top of each popup. Out-of-box, the application name will be NtfyToast.\n\nWith the `Windows Fall Creators Update`, you may modify the application name notifications on Windows 10 / 11 by supplying an `appID` to your notification javascript code. The appID must be the id assigned to the executable you wish to define that will show for the name at the top of the notification.\n\nIf you wish to brand notifications with your own application name, then there are a few steps you must complete.\n\n\u003cbr /\u003e\n\n### Create App Shortcut\n\nYou must create a windows shortcut (.lnk) within your windows Start Menu. This is a requirement by Microsoft.\n\nThe package used by Toasted Notifier for Windows 10 \u0026 11 notifications (ntfy-toast); includes a command which will help you create the shortcut link automatically. To do this, open Command Prompt and run the command:\n\n```shell\nX:\\path\\to\\node\\project\\node_modules\\toasted-notifier\\vendor\\ntfyToast\\ntfytoast.exe -install \"MyApp\\MyApp.lnk\" \"C:\\path\\to\\myApp.exe\" \"My.APP_ID\"\n```\n\n\u003cbr /\u003e\n\n| Argument | Description |\n| --- | --- |\n| `\"MyApp\\MyApp.lnk\"` | Where the lnk shortcut will be placed.  \u003cbr /\u003e \u003cbr /\u003e `C:\\Users\\USER\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\MyApp\\MyApp.lnk` |\n| `\"C:\\path\\to\\myApp.exe\"` | Path to the executable you want to show the name for at the top of notifications |\n| `\"My.APP_ID\"` | Your .exe app id |\n\n\u003cbr /\u003e\n\nTo get the appID for the application you want to use, you can open Powershell and run the command:\n\n```powershell\nget-StartApps | Where-Object {$_.Name -like '*YourAppName*'}\n```\n\n\u003cbr /\u003e\n\nIn our example, we can run\n```powershell\nget-StartApps | Where-Object {$_.Name -like '*Ntfytoast*'}\n```\n\n\u003cbr /\u003e\n\nWhich returns the following:\n```console\nName          AppID\n----          -----\nntfytoast     com.ntfytoast.id\n```\n\n\u003cbr /\u003e\n\nThis means that if I wanted to use NtfyToast as the app which sends notifications, my final command would be:\n\n```\nX:\\path\\to\\node\\project\\node_modules\\toasted-notifier\\vendor\\ntfyToast\\ntfytoast.exe -install \"Ntfytoast\\Ntfytoast.lnk\" \"C:\\path\\to\\ntfytoast.exe\" \"com.ntfytoast.id\"\n```\n\n\u003cbr /\u003e\n\nWhen the `.lnk` is created, it will be placed in:\n```\nC:\\Users\\USER\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\n```\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://github.com/Aetherinox/ntfy-toast/assets/118329232/ea9da9f3-4c8c-4fe5-9714-d4e83901f301\" width=\"440px\"\u003e\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n### Call App\nNow that you have your app shortcut created, you can simply call the app every time you want to send a notification using `appID`. Remember to use your own app's id.\n\n```javascript\nconst WindowsToaster = require('toasted-notifier').WindowsToaster;\n\nconst toasted = new WindowsToaster({\n    withFallback: false,            // Fallback to Growl or Balloons?\n    customPath: undefined           // Relative/Absolute path if you want to use your fork of SnoreToast.exe\n});\n\ntoasted.notify(\n    {\n        title: undefined,               // String           | Required\n        message: undefined,             // String           | Required if remove is not defined\n        icon: undefined,                // String           | Absolute path to Icon\n        sound: false,                   // Bool or String   | (as defined by http://msdn.microsoft.com/en-us/library/windows/apps/hh761492.aspx)\n        id: undefined,                  // Number           | ID to use for closing notification.\n        appID: 'com.ntfytoast.id',      // String           | App.ID and app Name. Defaults to no value, causing SnoreToast text to be visible.\n        remove: undefined,              // Number           | Refer to previously created notification to close.\n        install: undefined              // String           | \u003cpath, application, app id\u003e |  Creates a shortcut \u003cpath\u003e in the start menu which point to the executable \u003capplication\u003e, appID used for the notifications.\n    },\n    ( error, response ) =\u003e\n    {\n        console.log( response );\n    }\n);\n```\n\n\u003cbr /\u003e\n\nWith the above code, we have specified an `appID` on the following line:\n```javascript\n    appID: 'com.ntfytoast.id',\n```\n\n\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n# Help\n\nThe following is a list of questions or troubleshooting that may help you with implementing this node package.\n\n\u003cbr /\u003e\n\n## How to change text `NtfyToast` at the top of notifications\n\nIn order to change the text `NtfyToast`, you must supply an `-appID`. Windows Toast notifications require that you provide an application id for a valid Windows application before Windows will allow you to link another program.\n\nFor instructions on accomplishing this, read the section [appID support](#appid-support)\n\n\u003cbr /\u003e\n\n## Can't use Windows Toast notifications in WSL2\n\nNtfy makes use of a 3rd party package for Windows notifications to work. You must change the permissions on the Ntfy vendor .exe in order for it to work properly.\n\n```shell\nchmod +x node_modules/toasted-notifier/vendor/ntfyToast/ntfytoast.exe\n```\n\n\u003cbr /\u003e\n\nYou can add a `postinstall` action in the `package.json`:\n\n```yml\n \"scripts\": {\n        \"postinstall\": \"chmod +x node_modules/toasted-notifier/vendor/ntfyToast/ntfytoast.exe\n  }\n```\n\n\u003cbr /\u003e\n\n## Distributing with Electron\n\nIf you package your Electron based app as an asar; toasted-notifier will fail to load. This is because of how a asar package works. You cannot execute a binary from within an asar package. \n\nThe solution is that when packaging the app into an asar, make sure you `--unpack` the `vendor/` folder of `toasted-notifier/` so that the module still has access to the notification vendor binaries.\n\nYou can do so with the following command:\n\n```shell\nasar pack . app.asar --unpack \"./node_modules/toasted-notifier/vendor/**\"\n```\n\n\u003cbr /\u003e\n\nOr if you use electron-builder without using asar directly; append build object to your `package.json` as below:\n\n```\n...\nbuild: {\n  asarUnpack: [\n    './node_modules/toasted-notifier/**/*',\n  ]\n},\n...\n```\n\n\u003cbr /\u003e\n\n## Using Webpack\n\nWhen using `toasted-notifier` inside of webpack, you must add the snippet below to your `webpack.config.js`.\n\n```javascript\nnode: {\n  __filename: true,\n  __dirname: true\n}\n```\n\nThis is necessary because toasted-notifier loads the notifiers from a binary, and needs a relative file path. When webpack compiles the modules, it suppresses file directories, causing toasted-notifier to error on certain platforms.\n\n\u003cbr /\u003e\n\n## Windows: Where are files / .lnk files placed\n\nIn order for you to make your own custom application name appear at the top of a notification, you must create a `.lnk` in your Windows start menu. More about this is outlined in the section [AppID Support](#appid-support)\n\n\u003cbr /\u003e\n\nIf you need to delete any of the generated `.lnk` files, you can find them in the following locations:\n- `C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs`\n- `C:\\Users\\YOURUSERNAME\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs`\n\n\u003cbr /\u003e\n\nToasted-notifier will also cache `logo.png` in:\n- `C:\\Users\\YOURUSERNAME\\AppData\\Local\\Temp\\ntfytoast`\n\n\u003cbr /\u003e\n\nDelete any folders named `NtfyToast`, or whatever your custom app name is.\n\n\u003cbr /\u003e\n\n## Header icon broken / missing / default\nIf you show a notification and notice that the far top-left icon next to the app name is either missing or is showing a default application icon, you may need to clear your start menu `.lnk` file.\n\n\u003cbr /\u003e\n\nGo to the following folders, and delete the `NtfyToast/` folder. \n- `C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\NtfyToast\\`\n- `C:\\Users\\YOURUSERNAME\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\NtfyToast\\`\n\n\u003cbr /\u003e\n\nIf you are using a custom application, search for the app name as a folder, and delete that folder.\n\n\u003cbr /\u003e\n\n## Usage in tmux session\n\nWhen using toasted-notifier within a tmux session, it can cause the system to abruptly hang. To solve this issue:\n\n- Upgrade **tmux** from `1.9a` to `2.0` with `brew update \u0026\u0026 brew upgrade tmux`\n- Install **reattach-to-user-namespace** with `brew update \u0026\u0026 brew install reattach-to-user-namespace`\n- Open `~/.tmux.conf` and add the following lines:\n    ```\n    # Reattach each new window to the user bootstrap namespace\n    # https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard\n    set -g default-command \"which reattach-to-user-namespace \u003e /dev/null \u0026\u0026 reattach-to-user-namespace -l $SHELL || $SHELL -l\"\n    ```\n\n\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- BADGE \u003e GENERAL --\u003e\n[link-general-npm]: https://npmjs.com\n[link-general-nodejs]: https://nodejs.org\n[link-npmtrends]: http://npmtrends.com/toasted-notifier\n\n\u003c!-- BADGE \u003e VERSION \u003e GITHUB --\u003e\n[badge-version-gh]: https://img.shields.io/github/v/tag/Aetherinox/toasted-notifier?logo=GitHub\u0026label=Version\u0026color=ba5225\n[link-version-gh]: https://github.com/Aetherinox/toasted-notifier/releases\n\n\u003c!-- BADGE \u003e VERSION \u003e NPMJS --\u003e\n[badge-version-npm]: https://img.shields.io/npm/v/toasted-notifier?logo=npm\u0026label=Version\u0026color=ba5225\n[link-version-npm]: https://npmjs.com/package/toasted-notifier\n\n\u003c!-- BADGE \u003e LICENSE --\u003e\n[badge-license-mit]: https://img.shields.io/badge/MIT-FFF?logo=creativecommons\u0026logoColor=FFFFFF\u0026label=License\u0026color=9d29a0\n[link-license-mit]: https://github.com/Aetherinox/toasted-notifier/blob/main/LICENSE\n\n\u003c!-- BADGE \u003e BUILD --\u003e\n[badge-build]: https://img.shields.io/github/actions/workflow/status/Aetherinox/toasted-notifier/npm-publish.yml?logo=github\u0026logoColor=FFFFFF\u0026label=Build\u0026color=%23278b30\n[link-build]: https://github.com/Aetherinox/toasted-notifier/actions/workflows/npm-publish.yml\n\n\u003c!-- BADGE \u003e DOWNLOAD COUNT --\u003e\n[badge-downloads-gh]: https://img.shields.io/github/downloads/Aetherinox/toasted-notifier/total?logo=github\u0026logoColor=FFFFFF\u0026label=Downloads\u0026color=376892\n[link-downloads-gh]: https://github.com/Aetherinox/toasted-notifier/releases\n[badge-downloads-npm]: https://img.shields.io/npm/dw/%40aetherinox%2Ftoasted-notifier?logo=npm\u0026\u0026label=Downloads\u0026color=376892\n[link-downloads-npm]: https://npmjs.com/package/toasted-notifier\n\n\u003c!-- BADGE \u003e DOWNLOAD SIZE --\u003e\n[badge-size-gh]: https://img.shields.io/github/repo-size/Aetherinox/toasted-notifier?logo=github\u0026label=Size\u0026color=59702a\n[link-size-gh]: https://github.com/Aetherinox/toasted-notifier/releases\n[badge-size-npm]: https://img.shields.io/npm/unpacked-size/toasted-notifier/latest?logo=npm\u0026label=Size\u0026color=59702a\n[link-size-npm]: https://npmjs.com/package/toasted-notifier\n\n\u003c!-- BADGE \u003e COVERAGE --\u003e\n[badge-coverage]: https://img.shields.io/codecov/c/github/Aetherinox/toasted-notifier?token=MPAVASGIOG\u0026logo=codecov\u0026logoColor=FFFFFF\u0026label=Coverage\u0026color=354b9e\n[link-coverage]: https://codecov.io/github/Aetherinox/toasted-notifier\n\n\u003c!-- BADGE \u003e ALL CONTRIBUTORS --\u003e\n[badge-all-contributors]: https://img.shields.io/github/all-contributors/Aetherinox/toasted-notifier?logo=contributorcovenant\u0026color=de1f6f\u0026label=contributors\n[link-all-contributors]: https://github.com/all-contributors/all-contributors\n[badge-tests]: https://img.shields.io/github/actions/workflow/status/Aetherinox/toasted-notifier/npm-tests.yml?logo=github\u0026label=Tests\u0026color=2c6488\n[link-tests]: https://github.com/Aetherinox/toasted-notifier/actions/workflows/tests.yml\n[badge-commit]: https://img.shields.io/github/last-commit/Aetherinox/toasted-notifier?logo=conventionalcommits\u0026logoColor=FFFFFF\u0026label=Last%20Commit\u0026color=313131\n[link-commit]: https://github.com/Aetherinox/toasted-notifier/commits/main/\n\u003c!-- prettier-ignore-end --\u003e\n","funding_links":["https://buymeacoffee.com/aetherinox"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAetherinox%2Fnode-toasted-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAetherinox%2Fnode-toasted-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAetherinox%2Fnode-toasted-notifier/lists"}