Scripts2026年7月13日·1 分钟阅读

Dunst — Lightweight Customizable Notification Daemon for Linux

A lightweight and highly customizable notification daemon for Linux that displays desktop notifications following the freedesktop.org specification, popular with tiling window manager users.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Dunst
直接安装命令
npx -y tokrepo@latest install 9ea8e032-7e73-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Dunst is a lightweight replacement for the notification daemons provided by most desktop environments. It follows the freedesktop.org Desktop Notifications specification and is designed for users of tiling window managers who want full control over how notifications look and behave without pulling in heavy dependencies.

What Dunst Does

  • Displays desktop notifications from any application using libnotify or D-Bus
  • Supports notification stacking, urgency levels, and timeout customization
  • Renders notifications with Pango markup for rich text formatting
  • Allows per-application rules for styling, filtering, or scripting actions
  • Provides keyboard shortcuts for closing, cycling through, and acting on notifications

Architecture Overview

Dunst listens on the D-Bus session bus for notification messages following the org.freedesktop.Notifications interface. Incoming notifications are filtered through user-defined rules, assigned urgency-based styling, and rendered in a lightweight X11 or Wayland overlay window using Cairo and Pango. A FIFO history buffer stores dismissed notifications for later recall.

Self-Hosting & Configuration

  • Config file at ~/.config/dunst/dunstrc (INI-style format)
  • Customize fonts, colors, geometry, transparency, and corner radius
  • Define [rules] sections to match app name, summary, or body and override behavior
  • Set browser and dmenu for opening URLs and selecting actions from notifications
  • Supports both X11 and Wayland (via the layer-shell protocol)

Key Features

  • Minimal dependencies: no GTK, Qt, or DE framework required
  • Rule engine: match notifications by app, urgency, or content and apply custom actions
  • Scripting: run shell commands when specific notifications arrive
  • History recall: press a hotkey to re-show dismissed notifications
  • Wayland support: works on Sway, Hyprland, and other wlroots-based compositors

Comparison with Similar Tools

  • mako — Wayland-only notification daemon; simpler config, fewer features
  • swaync — notification center for Sway with a pop-out panel; heavier
  • notify-osd — Ubuntu's legacy daemon; minimal customization
  • herbe — minimal notification tool using X11; no D-Bus, very barebones
  • deadd-notification-center — Haskell-based daemon with a sidebar; richer UI

FAQ

Q: Does Dunst work on Wayland? A: Yes. Dunst supports Wayland via the layer-shell protocol since version 1.8.

Q: Can I add images to notifications? A: Yes. Applications can send icon data via D-Bus, and Dunst renders them according to icon_position and max_icon_size settings.

Q: How do I silence notifications temporarily? A: Use dunstctl set-paused true to pause and dunstctl set-paused false to resume. Bind these to hotkeys.

Q: Can Dunst run scripts on specific notifications? A: Yes. Add a script property in a rule section, and Dunst will execute it with notification data as environment variables.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产