dunst is a lightweight replacement for the notification daemons provided by most desktop environments. It is very customizable and does not depend on any toolkits.
Review the USE flags
USE flags for x11-misc/dunst Lightweight replacement for common notification daemons
||Enable dev-libs/wayland backend|
emerge --ask --verbose x11-misc/dunst
Unmerge other notification daemons
In order to avoid confusion other notification daemons could be removed, e.g. x11-misc/notification-daemon:
emerge --ask --verbose --depclean x11-misc/notification-daemon
D-Bus should start a notification daemon automatically, but if multiple are installed then it may just pick one. Starting dunst before any other notification daemons are fired up will make sure that dunst will handle your notifications. Review the used desktop setup on how to auto-start programs.
After the installation there is a working configuration file /etc/dunst/dunstrc. Edit this file to customize the settings for all users, or copy it to $XDG_CONFIG_HOME/dunst/dunstrc for setting for a single user.
Create notifications using the notify-send command:
notify-send "Summary" "Notification text."
Dunst provides a client called dunstctl. The dunstctl client supports passing commands to the running daemon.
Commands: action Perform the default action, or open the context menu of the notification at the given position close Close the last notification close-all Close the all notifications context Open context menu count [displayed|history|waiting] Show the number of notifications history Display notification history (in JSON) history-pop [ID] Pop the latest notification from history or optionally the notification with given ID. is-paused Check if dunst is running or paused set-paused [true|false|toggle] Set the pause status rule name [enable|disable|toggle] Enable or disable a rule by its name debug Print debugging information help Show this help
All currently displayed notification can be cleared as:
After modifying the configuration file use the killall dunst command, to apply new configuration:
- Release v1.5.0 · dunst-project/dunst, GitHub. Retrieved on March 10, 2022