LinuxCommandLibrary

dunstctl

Control and manage Dunst notifications

TLDR

Pause notifications

$ dunstctl set-paused true
copy

Un-pause notifications
$ dunstctl set-paused false
copy

Close all notifications
$ dunstctl close-all
copy

Display help
$ dunstctl --help
copy

SYNOPSIS

dunstctl [command]

PARAMETERS

close
    Closes the currently displayed notification.

close-all
    Closes all currently displayed notifications.

is-paused
    Checks if dunst is currently paused. Returns 0 if paused, 1 otherwise.

pause
    Pauses dunst, preventing new notifications from being displayed. Existing notifications remain unaffected.

unpause
    Unpauses dunst, allowing new notifications to be displayed.

history
    Re-displays the last closed notification.

count
    Prints the number of currently displayed notifications.

context
    Opens a menu to select any of the open notifications.

help
    Displays help information about dunstctl.

DESCRIPTION

dunstctl provides a command-line interface for controlling the dunst notification daemon. It allows users to manage notifications, such as closing, re-displaying, or getting the current notification count.
It is particularly useful for scripting and integrating notification management into custom workflows. It enables you to programmatically interact with the notification system, providing fine-grained control over how notifications are displayed and handled.
Using dunstctl, users can dismiss current notifications, invoke actions on the current notification (e.g., closing or snoozing), and check the number of active notifications. The command is simple to use and integrates cleanly into any shell environment, making it valuable for both casual users and advanced system administrators. It relies on dunst itself being properly configured and running for it to be useful.

RETURN VALUES

Most commands will return 0 on success and a non-zero value on failure. is-paused returns 0 if dunst is paused and 1 otherwise.

SEE ALSO

dunst(1)

Copied to clipboard