Dunst
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.
Installation
Review the USE flags
USE flags for x11-misc/dunst Lightweight replacement for common notification daemons
wayland
|
Enable dev-libs/wayland backend |
Emerge dunst
root #emerge --ask --verbose x11-misc/dunstUnmerge other notification daemons
In order to avoid confusion other notification daemons could be removed, e.g. x11-misc/notification-daemon:
root #emerge --ask --verbose --depclean x11-misc/notification-daemonStart dunst
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.
Dunst requires that DISPLAY or WAYLAND_DISPLAY is set to start
Start with Sway
~/.config/sway/configStart Dunst with Swayexec dunst &
Configuration
After the installation there is a working configuration file /etc/xdg/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.
user $cp -r /etc/xdg/dunst ~/.config/dunstUsage
Test dunst by creating a notification with the dunstify command:
user $dunstify "Title" "Content"Dunst provides a client called dunstctl[1]. The dunstctl client supports passing commands to the running daemon.
user $dunstctl --helpCommands:
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:
user $dunstctl close-allAfter modifying the configuration file use the killall dunst command, to apply new configuration:
user $killall dunstReferences
- ↑ Release v1.5.0 · dunst-project/dunst, GitHub. Retrieved on March 10, 2022