Dunst Notification Daemon
Dunst is a lightweight and customizable notification daemon for Linux, providing desktop notifications with extensive configuration options.Overview
Configuration file:~/.config/dunst/dunstrc
Dunst displays notifications with customizable appearance, behavior, and urgency levels.
Display Configuration
Basic Display Settings
Geometry Format
The geometry setting uses the format:WIDTHxHEIGHT-X+Y
Geometry Breakdown
Geometry Breakdown
- 350 - Width in pixels
- x5 - Show up to 5 notifications
- -4 - 4 pixels from right edge (negative = from right)
- +24 - 24 pixels from top edge (positive = from top)
Monitor and Follow Settings
follow = keyboard displays notifications on the monitor with keyboard focus. Options: none, mouse, keyboardNotification Appearance
Size and Spacing
Frame and Borders
| Parameter | Value | Description |
|---|---|---|
transparency | 0-100 | Window transparency level |
notification_height | 40 | Minimum notification height |
separator_height | 4 | Space between notifications |
corner_radius | 2 | Border radius in pixels |
Text Configuration
Font and Formatting
Format String
Format Variables
Format Variables
- %a - Application name
- %s - Summary (title)
- %b - Body text
- %i - Icon path
- %I - Icon name
- %p - Progress value (if provided)
- %n - Progress value without ”%” sign
- %% - Literal %
Text Processing
ellipsize = middle truncates long text in the middle, preserving start and end. Options: start, middle, endIcon Configuration
Icon Settings
History and Behavior
History Settings
Sorting and Timing
Behavior Options Explained
Behavior Options Explained
- sticky_history: Keep notifications in history when dismissed
- history_length: Maximum notifications to store
- sort: Sort notifications by urgency
- idle_threshold: Seconds before considering user idle
- Notifications are suppressed when idle
- They appear when you return
- Prevents notification spam while away
Keyboard Shortcuts
Available Shortcuts
| Shortcut | Action |
|---|---|
ctrl+space | Close current notification |
ctrl+shift+space | Close all notifications |
ctrl+grave (backtick) | Show notification history |
ctrl+shift+period | Open context menu |
Customize shortcuts by changing the keybindings in the
[shortcuts] section.Mouse Actions
Mouse Button Options
Available Mouse Actions
Available Mouse Actions
- none - Do nothing
- do_action - Execute notification action
- close_current - Close clicked notification
- close_all - Close all notifications
- context - Open context menu
- context_all - Open context menu for all
Urgency Levels
Low Urgency
Normal Urgency
Critical Urgency
Timeout Values
| Timeout | Behavior |
|---|---|
0 | Never timeout (requires manual dismiss) |
>0 | Timeout after N seconds |
-1 | Use default timeout |
Advanced Configuration
Application-Specific Rules
Add custom sections for per-application settings:Rule Matching
Available Matching Criteria
Available Matching Criteria
You can match notifications by:
- appname - Application name
- summary - Notification title
- body - Notification body text
- icon - Icon name or path
- category - Notification category
- msg_urgency - Urgency level
- stack_tag - Stack tag for grouping
- desktop_entry - Desktop entry name
Script Execution
Run scripts when notifications match:Fullscreen Behavior
Fullscreen Options
Fullscreen Options
- show - Always show notifications
- delay - Show only if no fullscreen window
- pushback - Hide when entering fullscreen
Starting Dunst
Auto-start with i3
Add to~/.config/i3/config:
Manual Start
Testing Notifications
notify-send -u low "Low" "Low urgency"
notify-send -u normal "Normal" "Normal urgency"
notify-send -u critical "Critical" "Critical urgency"
Notification Control
Using dunstctl
i3 Integration
Add to i3 config for quick control:Styling Tips
Modern Dark Theme
Minimal Style
Progress Bar Notifications
Troubleshooting
Common Issues
Notifications not showing
Notifications not showing
Check:
- Dunst is running:
pgrep dunst - No other notification daemons:
pgrep -a notification - Test with:
notify-send "Test" "Message" - Check config syntax:
dunst -print
Icons not displaying
Icons not displaying
Solutions:
- Install icon theme:
- Set correct icon path:
- Verify icon exists:
Shortcuts not working
Shortcuts not working
Check:
- No conflicting i3 bindings
- Dunst has focus when pressing shortcuts
- Try different key combinations
- Check with:
xbindkeys -mk
Experimental Features
Experimental features may be unstable. Enable with caution and refer to Dunst documentation for details.
Additional Configuration
Browser Integration
DMenu Integration
Startup Notification
Summary
Dunst provides a lightweight, highly customizable notification system perfect for i3 window manager. Key features include:- Urgency-based styling for different notification types
- Keyboard shortcuts for quick control
- History for missed notifications
- Per-application rules for custom behavior
- Minimal resource usage ideal for tiling WMs