Linux command
dunstify 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Send a notification
dunstify "[message]"
Notification with title
dunstify "[title]" "[body]"
Set urgency level
dunstify -u [critical] "[message]"
Set timeout
dunstify -t [5000] "[message]"
Add action button
dunstify -A "[action,label]" "[message]"
Replace notification
dunstify -r [id] "[updated message]"
Set icon
dunstify -i [icon_name] "[message]"
说明
dunstify is a notification client specifically designed for dunst, offering extended features beyond the standard notify-send utility. It implements the freedesktop.org notification specification with dunst-specific enhancements. The tool's key advantage is notification replacement: by storing the notification ID from a previous call (via --printid), subsequent notifications can update the existing one rather than creating duplicates. This is essential for progress indicators, status updates, and volume/brightness notifications. Additional features include action buttons that can trigger commands when clicked, custom hints for advanced styling, and the ability to close notifications programmatically. The tool integrates seamlessly with dunst's configuration for consistent appearance and behavior.
参数
- -u, --urgency _level_
- Urgency (low, normal, critical).
- -t, --timeout _ms_
- Timeout in milliseconds.
- -i, --icon _icon_
- Icon name or path.
- -r, --replace _id_
- Replace notification with ID.
- -A, --action _action,label_
- Add action button.
- -C, --close _id_
- Close notification by ID.
- -h, --hints _hint_
- Set hints.
- -p, --printid
- Print notification ID.
FAQ
What is the dunstify command used for?
dunstify is a notification client specifically designed for dunst, offering extended features beyond the standard notify-send utility. It implements the freedesktop.org notification specification with dunst-specific enhancements. The tool's key advantage is notification replacement: by storing the notification ID from a previous call (via --printid), subsequent notifications can update the existing one rather than creating duplicates. This is essential for progress indicators, status updates, and volume/brightness notifications. Additional features include action buttons that can trigger commands when clicked, custom hints for advanced styling, and the ability to close notifications programmatically. The tool integrates seamlessly with dunst's configuration for consistent appearance and behavior.
How do I run a basic dunstify example?
Run `dunstify "[message]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -u, --urgency _level_ do in dunstify?
Urgency (low, normal, critical).