Notifier (fnord v0.8.83)

View Source

A simple notification module that works on MacOS and Linux.

On macOS it uses AppleScript (osascript); on Linux it uses notify-send or dunstify.

If neither is available, it falls back to printing a bell to STDERR.

Summary

Functions

Attempts to dismiss/clear notifications for the given group. Only works on systems that support notification dismissal.

Types

platform()

@type platform() :: :mac | :linux | :other

Functions

dismiss(group \\ "fnord", opts \\ [])

@spec dismiss(
  String.t(),
  keyword()
) :: :ok | {:error, term()}

Attempts to dismiss/clear notifications for the given group. Only works on systems that support notification dismissal.

notify(title, body, opts \\ [])

@spec notify(String.t(), String.t(), keyword()) :: :ok | {:error, term()}