LinuxCommandLibrary

dunst

Display desktop notifications

TLDR

Start dunst

$ dunst
copy

Display a notification on startup
$ dunst -startup_notification
copy

Print coming notifications to stdout
$ dunst -print
copy

Use the specified configuration file (default: $XDG_CONFIG_HOME/dunst/dunstrc)
$ dunst -config [path/to/file]
copy

SYNOPSIS

dunst [OPTIONS]

PARAMETERS

-conf FILE
    Specifies an alternative configuration file to use instead of the default dunstrc.

-v
    Prints the current version information of Dunst.

-h
    Displays a help message with available command-line options.

-r
    Sends a reload signal to a running Dunst instance, causing it to re-read its configuration file.

-s
    Sends a status request to a running Dunst instance, useful for debugging or monitoring its state.

-q
    Suppresses debug messages printed to standard output or log files, making output quieter.

-x
    Prints incoming notifications to standard output in a simple format, primarily used for debugging notification streams.

DESCRIPTION

Dunst is a highly configurable and lightweight notification daemon designed for Linux and BSD systems. It strictly adheres to the Freedesktop.org Notification Specification, making it compatible with most applications that send desktop notifications. Unlike heavier desktop environments' notification systems, Dunst operates independently, making it an ideal choice for minimalist window managers like i3, bspwm, or Sway.

Its core strengths include speed, unobtrusiveness, and extensive customization options. Users can define rules based on urgency, sender, or content to alter notification appearance, duration, or even execute custom scripts. It also features a notification history, allowing users to recall past alerts, and supports interactive actions directly from the notification.

Dunst aims to provide essential notification functionality without unnecessary bloat, offering a seamless and personalized notification experience.

CAVEATS

While highly customizable, Dunst relies heavily on its configuration file (dunstrc) for advanced features, which can become complex for new users. It requires a running X11 or Wayland display server to function. Debugging configuration issues often involves manually checking the dunstrc file and running Dunst with verbose output (`-x` option).

CONFIGURATION FILE

The primary configuration for Dunst is handled via the dunstrc file, typically located at ~/.config/dunst/dunstrc or $XDG_CONFIG_HOME/dunst/dunstrc. This file allows extensive customization of appearance (font, colors, geometry), behavior (notification rules, urgency levels, timeout), and keyboard shortcuts. It is the central place for defining how notifications are displayed and handled.

NOTIFICATION RULES

Dunst allows users to define powerful rules in the dunstrc file to modify notifications based on various criteria such as application name, summary, body, or urgency level. These rules can alter the notification's appearance, timeout, or even execute a custom script in response to an event, providing granular control over how alerts are displayed and processed.

RUNTIME CONTROL

A separate utility, dunstctl, provides command-line control over a running Dunst instance. It can be used to close the current notification, view notification history, invoke actions associated with notifications, or pause/resume Dunst. This allows for dynamic interaction with the daemon without needing to restart it or rely on graphical interfaces.

HISTORY

Dunst emerged as a response to the perceived bloat and lack of customization in existing notification daemons prevalent in traditional desktop environments. Its development aimed to provide a fast, minimalist, and highly configurable solution, especially appealing to users of tiling window managers and those who prefer a desktop environment-agnostic setup. Since its inception, it has gained significant traction within the Linux community for its efficiency and flexibility, becoming a de facto standard for lightweight notification management.

SEE ALSO

notify-send(1), dunstctl(1), mako(1), xfce4-notifyd(1)

Copied to clipboard