Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uki00a/deno-notifier.ts
Send desktop notifications with Deno
https://github.com/uki00a/deno-notifier.ts
desktop-notifications
Last synced: 22 days ago
JSON representation
Send desktop notifications with Deno
- Host: GitHub
- URL: https://github.com/uki00a/deno-notifier.ts
- Owner: uki00a
- License: mit
- Created: 2021-07-03T17:45:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-16T23:03:36.000Z (over 1 year ago)
- Last Synced: 2024-10-04T13:33:07.650Z (about 1 month ago)
- Topics: desktop-notifications
- Language: TypeScript
- Homepage: https://deno.land/x/notifier
- Size: 24.4 KB
- Stars: 18
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deno-notifier.ts
[![Build Status](https://github.com/uki00a/deno-notifier.ts/workflows/ci/badge.svg)](https://github.com/uki00a/deno-notifier.ts/actions)
![https://img.shields.io/github/tag/uki00a/deno-notifier.ts.svg](https://img.shields.io/github/tag/uki00a/deno-notifier.ts.svg)
[![license](https://img.shields.io/github/license/uki00a/deno-notifier.ts)](https://github.com/uki00a/deno-notifier.ts)
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/notifier/mod.ts)deno-notifier.ts is a Deno module for sending desktop notifications. It is
written in pure TypeScript.> **This module is still highly experimental! In particular, it has not been
> fully tested on Windows and Mac OS.**## Usage
```ts
import { notify } from "https://deno.land/x/notifier/mod.ts";await notify("This is a title", "This is a message");
await notify({
title: "Hello",
message: "World",
sound: "device-added", // only supported in Linux and macOS
});
```This module also provides API inspired by
[WHATWG's Notifications API](https://notifications.spec.whatwg.org/) (**WIP**).```ts
import { Notification } from "https://deno.land/x/notifier/whatwg/mod.ts";new Notification("Hello", {
body: "World",
icon: "/path/to/icon.png",
});
```## Requirements
### Linux
You'll need to install one of the following:
- `notify-send`
### Mac OS X
You'll need to install one of the following:
- `osascript`
### Windows
You'll need to install one of the following:
- [Snoretoast](https://github.com/KDE/snoretoast)
## Prior works
- Node.js
- https://github.com/mikaelbr/node-notifier
- Go
- https://github.com/0xAX/notificator
- Ruby
- https://github.com/fnando/notifier