pax_global_header 0000666 0000000 0000000 00000000064 14762024016 0014514 g ustar 00root root 0000000 0000000 52 comment=fc78b9f11aa8b63f4d81c96466206a9b63a22f07
dunst-1.12.2/ 0000775 0000000 0000000 00000000000 14762024016 0012734 5 ustar 00root root 0000000 0000000 dunst-1.12.2/.github/ 0000775 0000000 0000000 00000000000 14762024016 0014274 5 ustar 00root root 0000000 0000000 dunst-1.12.2/.github/ISSUE_TEMPLATE.md 0000664 0000000 0000000 00000001324 14762024016 0017001 0 ustar 00root root 0000000 0000000
### Issue description
### Installation info
- Version: ``
- Install type: ``
- Window manager / Desktop environment: ``
- Distro: ``
Minimal dunstrc
```ini
# Dunstrc here
```
dunst-1.12.2/.github/workflows/ 0000775 0000000 0000000 00000000000 14762024016 0016331 5 ustar 00root root 0000000 0000000 dunst-1.12.2/.github/workflows/main.yml 0000664 0000000 0000000 00000005277 14762024016 0020013 0 ustar 00root root 0000000 0000000 name: main
on:
push:
pull_request:
branches:
- master
jobs:
# Enforce the standard of g_malloc instead of malloc in the project
enforce-g_malloc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: enforce-g_malloc
run: "! git grep -P '(?> ${GITHUB_ENV}
- name: configure safe directory for git
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: build
run: make -j all dunstify test/test
- name: test
run: make -j test
- name: installation
run: ./test/test-install.sh
- name: valgrind memleaks
run: make clean && make -j test-valgrind
runs-on: ubuntu-latest
container:
image: ghcr.io/dunst-project/docker-images:${{ matrix.distro }}
coverage:
needs: build
env:
CC: gcc
steps:
- uses: actions/checkout@v4
with:
# Clone the whole history including tags.
fetch-depth: 0
- name: setup $HOME for git
run: echo "HOME=${RUNNER_TEMP}" >> ${GITHUB_ENV}
- name: configure safe directory for git
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: coverage
run: make clean && make -j test-coverage
- name: Generate coverage report
run: lcov -c -d . -o lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
name: fedora-gcc
fail_ci_if_error: true
runs-on: ubuntu-latest
container:
image: ghcr.io/dunst-project/docker-images:fedora
doxygen:
steps:
- uses: actions/checkout@v4
- name: doxygen
run: make -j doc-doxygen
runs-on: ubuntu-latest
container:
image: ghcr.io/dunst-project/docker-images:misc-doxygen
dunst-1.12.2/.gitignore 0000664 0000000 0000000 00000000314 14762024016 0014722 0 ustar 00root root 0000000 0000000 *.swp
*.o
*.d
*.gcda
*.gcno
*.gcov
/lcov.info
core
vgcore.*
/docs/*.1
/docs/*.5
/docs/internal/coverage
/docs/internal/html
/dunst
/dunstify
/dunst.systemd.service
/org.knopwob.dunst.service
/test/test
dunst-1.12.2/.valgrind.suppressions 0000664 0000000 0000000 00000010534 14762024016 0017322 0 ustar 00root root 0000000 0000000 # Ignore musls' weird error
{
musl_alpine_libc
Memcheck:Free
fun:free
obj:/lib/ld-musl-x86_64.so.1
}
# Ignore another musls' weird error
{
musl_alpine_libc
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:realloc
fun:getdelim
obj:*
fun:vgMemCheck_new_block
obj:*
}
# Ignore yet another musls' weird error
{
musl_alpine_libc
Memcheck:Leak
match-leak-kinds: definite
fun:realloc
fun:getdelim
...
}
# rsvg_error_handle_close got fixed in
# - GNOME/librsvg@7bf1014
# (2018-11-12, first tags: v2.45.0, v2.44.9)
# but the release has to seep into the distros
{
rsvg_error_handle_close
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:g_malloc
fun:g_slice_alloc
fun:g_error_new_valist
fun:g_set_error
obj:*/librsvg-2.so*
fun:rsvg_handle_close
obj:*/loaders/libpixbufloader-svg.so
fun:gdk_pixbuf_loader_close
fun:gdk_pixbuf_get_file_info
fun:get_pixbuf_from_file
...
}
# same as above, but as occurs in CI environment
{
rsvg_error_handle_close2
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:g_malloc
fun:g_slice_alloc
fun:g_error_new_valist
fun:g_set_error
obj:*/librsvg-2.so*
obj:*/librsvg-2.so*
obj:*/loaders/libpixbufloader-svg.so
obj:*/libgdk_pixbuf-2.0.so*
fun:gdk_pixbuf_loader_close
fun:gdk_pixbuf_get_file_info
fun:get_pixbuf_from_file
...
}
# Some new in ArchLinux
{
rsvg_rust_handle_close
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
...
fun:rsvg_rust_handle_close
obj:*/loaders/libpixbufloader-svg.so
...
fun:gdk_pixbuf_new_from_file
...
}
# rsvg_error_writehandler got fixed in
# - GNOME/librsvg@7b4cc9b
# (2018-11-12, first tags: v2.45.0, v2.44.9)
# but the release has to seep into the distros
{
rsvg_error_writehandler
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:g_malloc
fun:g_slice_alloc
fun:g_error_new_valist
fun:g_set_error
obj:*/librsvg-2.so*
fun:rsvg_handle_write
obj:*/loaders/libpixbufloader-svg.so
obj:*/libgdk_pixbuf-2.0.so*
fun:gdk_pixbuf_loader_close
fun:gdk_pixbuf_get_file_info
fun:get_pixbuf_from_file
...
}
# a librsvg memoryleak that shows up in arch, but not in the CI environment
{
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
obj:/usr/lib/librsvg-2.so.2.48.0
...
fun:rsvg_handle_close
obj:/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
obj:/usr/lib/libgdk_pixbuf-2.0.so.0.4200.6
fun:gdk_pixbuf_new_from_file
...
}
# fontconfig memory leaks that occur when using certain pango library
# functions, such as pango_layout_get_pixel_size
{
fontconfig_pango_leaks
Memcheck:Leak
fun:*alloc
...
obj:*fontconfig*
...
obj:*pango*
...
}
{
rsvg_conditional_jump
Memcheck:Cond
obj:/usr/lib*/librsvg-2.so.2.48.0
...
fun:rsvg_handle_get_pixbuf
obj:/usr/lib*/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
obj:/usr/lib*/libgdk_pixbuf-2.0.so.0.4200.10
fun:gdk_pixbuf_new_from_file
fun:notification_setup_raw_image
fun:notification_load_icon_with_scaling
...
}
{
# Basically the same as above, but just for Debian
rsvg_conditional_jump-debian
Memcheck:Cond
obj:/usr/lib/*/librsvg-2.so.2.48.0
...
fun:rsvg_handle_get_pixbuf
obj:/usr/lib/*/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
obj:/usr/lib/*/libgdk_pixbuf-2.0.so.0.4200.8
fun:gdk_pixbuf_new_from_file
fun:notification_setup_raw_image
fun:notification_load_icon_with_scaling
...
}
{
# Basically the same as above, but just for Ubuntu Focal
rsvg_conditional_jump-ubuntu_focal
Memcheck:Cond
obj:/usr/lib/*/librsvg-2.so.2.47.0
...
fun:rsvg_rust_handle_close
obj:/usr/lib/*/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
obj:/usr/lib/*/libgdk_pixbuf-2.0.so.0.4000.0
fun:gdk_pixbuf_new_from_file
fun:notification_setup_raw_image
fun:notification_load_icon_with_scaling
...
}
{
# Something new on Ubuntu Noble Numbat
rsvg_conditional_jump-ubuntu_focal
Memcheck:Cond
obj:/usr/lib/*/librsvg-2.so.2.50.0
...
fun:rsvg_handle_new
obj:/usr/lib/*/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
obj:/usr/lib/*/libgdk_pixbuf-2.0.so.0.4200.10
fun:gdk_pixbuf_new_from_file
fun:notification_setup_raw_image
fun:notification_load_icon_with_scaling
...
}
dunst-1.12.2/AUTHORS 0000664 0000000 0000000 00000000176 14762024016 0014010 0 ustar 00root root 0000000 0000000 Sascha Kruse (http://github.com/knopwob)
contributors:
See `git shortlog` for a list of contributors and their contributions
dunst-1.12.2/CHANGELOG.md 0000664 0000000 0000000 00000062372 14762024016 0014557 0 ustar 00root root 0000000 0000000 # Dunst changelog
## 1.12.2 -- 2025-03-05
### Added
- Add `urgency`, `stack_tag` and `urls` to dunstctl history (#1425, #1426)
- Add `--category` to dunstify (also change `-c` behaviour) (#1429)
- Add dbus signals `NotificationHistoryRemoved`, `NotificationHistoryCleared` and `ConfigReloaded` (#1405, #1277)
### Changed
- Allow to override build date with `SOURCE_DATE_EPOCH` (#1435)
- Flush after printing id in dunstify
### Fixed
- IMPORTANT: Resolve incompatibility between dunstify and libnotify-0.8.4 (#1443, #1445, #1449)
- Fix mixup of `bool` and `gboolean` that caused problems in s390x (#1421, #1422)
- Fix some printf warnings and int/gint/size_t mixed uses (#1424)
- Fix the scaling of the progress bar gradient (#1447)
- Actually reload old config files upon `dunstctl reload` (#1447)
## 1.12.1 -- 2024-12-17
### Changed
- Improve man pages and add `dunstify(1)`
- Accept old `height` syntax again (with notice) (#1412)
- Add `history-clear` and `history-rm` zsh completions (#1418)
### Fixed
- Memory corruption when reloading (#1413)
- Fix height calculation regression (#1411)
- Handle correctly file uri icons (#1409)
- Fix typos in docs (#1415)
## 1.12.0 -- 2024-11-30
### Added
- Export rules via dbus with `dunstctl rules [--json]` (#1212)
- Added checks and messages for missing DBUS\_SESSION\_BUS\_ADDRESS (#1389)
- Add `-e/--exit` flag to `dunstctl is-paused` to exit with 1 when paused (#1378)
- Add color gradients for the progress bar (by providing a list of colors instead of one) (#1370)
- Use TESTDIR env var as the base for the test program (#1376)
- Add `dunstctl reload` to hot reload the configuration (#1350)
- Add an optional id to `dunstctl close` (#1351)
- Print compile-time options in `dunst --version` (#1336)
### Changed
- BREAKING: Implement dynamic height (changes the the `height` setting, see manual) (#1342)
- Change the preferred syntax of `offset` from `NxN` to `(N,N)` (#1330)
- Install the systemd service file in the session.slice (#1397)
- Open url with `dunstctl action` if no action is present (#1345,#1395)
- Remove default icons (now no icons are hard-coded) (#1365,#1358)
- Various updates to documentation and test suite
### Fixed
- Order of context menu was reversed (#1394,#1375)
- Resolve ~ and $HOME in `icon_path` (#1383,#1371)
- Fix broken link to freedesktop's notification specs in man page (#1381)
- Remove the message about shortcuts deprecation (#1353)
- Fix vertical padding behaviour (#1342)
- Fix bash completion (#1347)
- Fix file suffix for fish completions during installation (#1339)
## 1.11.0 -- 2024-04-15
### Added
- Add `corners`, `progress_bar_corners` and `icon_corners` options to control which corners to round (#1268)
- Support GTK/CSS cursor names on Wayland (#1276)
- Make dunst more portable (#1288)
- Print detected monitors names (X11) (#1332)
### Changed
- Make X11 optional in build (this allows wayland-only dunst) (#1290)
- Shell completions are now official and can be installed from the Makefile (#1262, #1263)
- Don't search for icon path if icons are disabled (#1301)
- Eagerly parse and cache colors (#1306)
- Update dunstctl manpage (#1298)
- Update documentation (#1315, #1334)
### Fixed
- Fix settings initialization (this prevented --print and --startup\_notification from working) (#1299)
- Rework timer logic and fix error about Glib source ID for good (#1308, #1196)
- Prevent memory corruption in XrmSetDatabase (#1256, #1291)
- Don't try to print NULL strings (#1323)
- Do not resolve icon paths twice (#1307, #1314)
- Don't crash the test suite if librsvg is not present (#1329)
- Fix memory leak in DBus RuleEnable (#1328)
- Fix dunstctl rule (#1281)
- Remove newlines from icon logging (#1296)
- Prevent make from failing if git tags are not found (#1287)
- Fix some typos (#1324, #1325, #1279)
## 1.10.0 -- 2024-02-19
### Added
- Unofficial fish and bash completions (#1205, 1209)
- Multiple pause levels to allow selective pausing of notifications (#1193)
- `--startup_notification` option as an alternative to `-startup_notification` (#1208)
- Expand variables, like `$HOME` in path in your dunstrc. See `man 3 wordexp` for the details (#1215)
- Support for stable output names for the `monitor` (eDP-1, HDMI-1, etc). This is more relyable than the order of monitors. (#1250)
- Wayland multiseat and touchscreen support (#1250)
### Changed
- The cursor is now being drawn by the compositor, making sure the right cursor theme and scaling is being used (#1250)
### Fixed
- Various documentation issues
- Icon path not being interpreted as a path (#1210)
- Handling of some commandline options (#1208)
- Improved handling of fallback fonts (#1222)
- Progress bar not rendering correctly for big corner radiusses compared to width (#1227)
- Whitespace and brackets in dunstctl usage output (#1230, #1233)
- Errors about Glib source ID spamming the log (#1257)
- Idle idle_threshold not working anymore in Wayland due to Wayland protocol changes (#1250)
## 1.9.2 -- 2023-04-20
### Fixed
- Various documentation issues (#1151, #1154, #1162)
- High cpu usage when `show_age_treshold = -1` (#1164)
- High cpu usage in some situation. This is often correlated with being idle. (#1158)
## 1.9.1 -- 2023-03-08
### Added
- zsh completion for dunst and dunstctl (#1107 and #1108)
- dunstctl `history-clear` command to delete all notifications from history (#1131)
- dunstctl `history-rm command` to remove a single notification from history (#1128)
- `progress_bar_corner_radius` option for adding rounded corners to the progress bar (off by default) (#1119)
- `icon_corner_radius` option for adding rounded corners to notification icons (#1139)
### Changed
- Make libnotify and dunstify optional in build (#1129)
### Fixed
- Man page typo's and readability (#1088 and #1121)
- Length changes not being emitted over D-Bus (#1127)
- Crash when locking screen with swaylock on Sway (#1148)
- Dunst using 100% in some configurations with `idle_threshold` turned on (#1140)
## 1.9.0 -- 2022-06-27
### Added
- `override_dbus_timeout` setting to override the notification timeout set via
dbus. (#1035)
- Support notification gaps via the `gap_size` setting. Note that since the
notifications are not separate windows, you cannot click in between the
notifications. (#1053)
- Make `min_icon_size` and `max_icon_size` a rule for even more flexibility
(#1069)
### Changed
- The window offset is now scaled according to `scale` as well. This way
notification stay visually in the same place on higher DPI screens. (#1039)
- For the recursive icon lookup, revert to using `min_icon_size` and
`max_icon_size` instead of `icon_size`. `min_icon_size` is used as the size to
look for in icon themes. This way of defining icon size is more flexible and
compatible with the old icon lookup. The new icon lookup should now be
superior for all use cases. (#1069)
- Recursive icon lookup is no longer experimental.
- Recursive icon lookup is enabled in the default dunstrc. This does not change
your settings when you have a custom dunstrc.
### Fixed
- Added back the `action_name` setting that was accidentally dropped. (#1051)
- Broken `dunstctl history`. (#1060)
- Merged a few wayland fixes from mako (https://github.com/emersion/mako)
(#1067)
- `follow=keyboard`: Fix regression where we don't fall back to mouse (#1062)
- Raw icons not being scaled according to icon size (#1043)
- Notifications not disappearing. For some people notifications would sometimes
stay on screen until a new notification appeared. This should not happen
anymore (#1073).
## 1.8.1 -- 2022-03-02
### Fixed
- Dunst sometimes not using the right config file, sometimes falling back to the
internal defaults.
## 1.8.0 -- 2022-02-24
### Added
- Implemented `progress_bar_min_width`. Before it was an unused setting. (#1006)
- `progress_bar_horizontal_alignment` for changing the alignment of the progress
bar. (#1021)
- Support for config drop-ins. You can add as many configuration files as you
want in `dunstrc.d`. See the man page dunst(1) for more information. This was
done with help from @WhitePeter. (#997)
- Thanks to @m-barlett you can place your icons at the center of your
notifications with `icon_position = top`.
- `icon_position` is now a rule (also by @m-barlett).
- `hide_text` for hiding all text of a notification. This also removes all
padding that would be present for a notification without text. (also by
@m-barlett) (#985)
- The previously removed keyboard shortcuts have been added again, but now they
are in the `[global]` section of the config. Not everything that was possible
with the keyboard shortcuts was possible with dunstctl on X11. Mainly
activating a keyboard shortcut only when notifications are on screen. Thanks
to @wgmayer0 for testing. (#1033).
### Changed
- Improved the man page regarding transitioning from the old geometry.
- The default alignment of the progress bar is now center instead of left.
- Better regex matching for rules. When you set `enable_posix_regex`. Take a
look at
https://en.m.wikibooks.org/wiki/Regular_Expressions/POSIX-Extended_Regular_Expressions
for how the new regex syntax works. Note that you cannot do inverse matching
yet, I'm working on that in #1040. (#1017)
- Thanks to @kurogetsusai you can once again use negative offsets to put a
notification window slightly off-screen if you so like. (#1027)
- As mentioned above, the keyboard shortcuts have been moved to the `[global]`
section. Please move your settings there.
### Fixed
- Crash when `open_url` was used without URL's. (#1000)
- Icons sometimes being incorrectly sized with the new icon lookup. (#1003)
- Incorrect defaults mentioned in the documentation. (#1004, #1029 and more)
- Crash when icon could not be read by glib. (#1023)
- Not being able to override anymore raw icons with `new_icon` (#1009)
- High cpu usage when selecting an action in dmenu or similar. This was caused
by dunst not going to sleep when waiting for a response. (#898)
- Updated default values documentation (with help from @profpatch) (#1004 and more)
## 1.7.3 -- 2021-12-08
### Changed
- `follow` is now `none` again by default. This was the case before v1.7.0 as well. (#990).
### Fixed
- `dunstctl action` is now working again.
- Segfault in experimental icon lookup when an inherited theme doesn't exist.
- `icon_position = off` not being respected (#996).
## 1.7.2 -- 2021-11-30
### Added
- Experimental recursive icon lookup. This is not enabled by default and can be
enabled by setting `enable_recursive_icon_lookup=true`. Setting icon sizes
still doesn't work entirely as it's supposed to and will be improved in future
releases. (#965)
- You can now enable or disable rules on the fly with `dunstctl rule $name$
enable/disable`. (#981)
- `dunstctl history` lists your notification history in JSON format for
processing by scripts. (#970)
- You can now pop specific notifications from history by passing a notification
ID to `dunstctl history-pop`. (#970)
- `default_icon` setting for setting the icon when no icons are given (#984)
- Implemented display size detection in Wayland. (#973)
### Fixed
- Text being cut off on X11 when using fractional scaling. (#975)
- Incorrect hitbox for notification on X11 with scaling. (#980)
- Improved warning messages for deprecated sections. (#974)
- `icon` being interpreted as a filter and not being allowed in the special
urgency sections. This is a compatibility fix, but it's recommended to replace
all usages of `icon` in these sections with `default_icon` to prevent
confusion with the `icon` rule in other sections. (#984)
- `new_icon` being used in the default dunstrc where `default_icon` is the
intended settings. This was commented by default, so it doesn't affect any
default behaviour. (#984)
- Notifications bleeding to other screens when the width was big enough. Now the
notification's width is lowered when it would otherwise leave the display.
## 1.7.1 -- 2021-11-01
### Added
- Script environment variable `DUNST_DESKTOP_ENTRY`. (#874)
- Rule `set_category` for change a notifications category with rules. (1b72b2a)
### Fixed
- Dunst not building with WAYLAND=0. (#938)
- Wrong icon being shown in chromium-based browsers. (#939)
- `set_stack_tag` not working anymore. (#942)
- Outdated documentation. (#943, #944 and more)
- Empty strings not being allowed in settings. (#946)
- Dunst crashing when compositor doesn't support `zwlr_foreign_toplevel_v1`. (#948)
- Xmore notifications showing a progress bar and icon. (#915)
- Markup is now a rule again. Before this was undocumented behaviour. (#955)
- Double free when setting `XDG_CONFIG_DIR`. (#957)
- Dunst crashing on some compositors. (#948)
- Dunst not exiting when wayland compositor quits. (#961)
- Now the separators are not responsive to mouse clicks anymore. (#960)
- Mouse action stopping the rest of the actions. (bf58928)
## 1.7.0 -- 2021-10-19:
### Added
- `context` and `context_all` mouse actions for opening the context menu (#848)
- `open_url` mouse action for opening url's in a notification (#848)
- `action_name` rule for setting a default action to perform when using
`do_action` (#848)
- HiDPI support for both Wayland and X11. On wayland the scale can be set from
your compositor's settings and is automatically picked up by dunst. On X11
dunst will guess the scale based on the DPI of the screen. If that isn't good,
you can set the `scale` variable in the settings. (#854 and #890)
- `highlight` can now also be set through dbus hints with the key `hlcolor`
(#862)
- Your dunstrc is now being checked by dunst. Dunst will print a warning when
coming across an non-existing/invalid setting. (#803)
- Wayland fullscreen detection (#814)
- Wayland touch support (#814)
- Cursor is now being changed to `left_ptr` when hovering over dunst (Wayland)
(#903)
### Changed
- `startup_notification` and `verbosity` are now only available as a command
line arguments. (#803)
- Rule settings can now also be used in the `[global]` section. They will then
apply to all the notifications. (#803)
- `fullscreen`, `ellpsize` and `word_wrap` are now rules. They can still be used
in the `[global]` section as well (see above). (#937 and #803)
- The appid's now also need to match when stacking notifications. (#886)
- `xdg-open` is now being used by default for opening URL's. (#889)
- `geometry` and `notification_height` have been replaced by `origin`, `width`,
`height`, `offset` and `notification_limit`. This allows for more flexible
geometry settings. (#855)
- There were a bunch of changes in the installation and default locations. See
the release notes for more information.
- Upon seeing invalid markup, dunst is a bit smarter in stripping the markup.
### Fixed
- Lots of debug messages when `idle_timeout=0` (#814)
- `follow=none` not working on Wayland (#814)
- Incorrect sorting when `sort` is false
- NULL pointer dereference on Wayland
- Dunst not redrawing after `close_all` action.
- Dunst not announcing icon-static capability over dbus (#867)
- Dunst not falling back to X11 output when it can't initialize the Wayland
output. (#834)
- Improve stability on Wayland. (#930 and more)
### Removed
- The `[shortcuts]` section with all it's settings. Use your WM/DE's shortcut
manager and `dunstctl` to replace it. (#803)
- Setting settings via command line arguments. (#803)
- Setting settings via `config.h`. (#803)
## 1.6.1 -- 2021-02-21:
### Fixed
- Incorrect version in Makefile
## 1.6.0 -- 2021-02-21:
### Added
- Wayland support. Dunst now runs natively on wayland. This fixes several bugs
with dunst on wayland and allows idle detection. (#781)
- A progress bar, useful for showing volume or brightness in notifications (#775)
- A script in contrib for using the progress bar (#791)
- `dunstctl count` for showing the number of notifications (#793)
- Expose environment variables info about the notification to scripts (#802)
- `text_icon_padding` for adding padding between the notification icon and text
(#810)
### Changed
- Dunst now installs a system-wide config in `/etc/dunst/dunstrc` (#798)
- Move part of the man page to dunst(5) (#799)
### Fixed
- `history_ignore` flag broken when using multiple rules (#747)
- Divide by zero in radius calculation (#750)
- Monitor setting overriding `follow_mode` (#755)
- Incorrect monitor usage when using multiple X11 screens (#762)
- Emit signal when `paused` property changes (#766)
- `dunstify` can pass empty appname to libnotify (#768)
- Incorrect handling of 'do_action, close' mouse action (#778)
### Removed
- `DUNST_COMMAND_{PAUSE,RESUME,TOGGLE}` (#830)
## 1.5.0 -- 2020-07-23
### Added
- `min_icon_size` option to automatically scale up icons to a desired value (#674)
- `vertical_alignment` option to control the text/icon alignment within the notification (#684)
- Ability to configure multiple actions for each mouse event (#705)
- `dunstctl` command line control client (#651)
- RGBA support for all color strings (#717)
- Ability to run multiple scripts for each notification
- `ignore_dbusclose` setting (#732)
### Changed
- `dunstify` notification client is now installed by default (#701)
- Keyboard follow mode falls back to the monitor with the mouse if no window has keyboard focus (#708)
### Fixed
- Overflow when setting a >=40 minute timeout (#646)
- Unset configuration options not falling back to default values (#649)
- Crash when `$HOME` environment variable is unset (#693)
- Lack of antialiasing with round corners enabled (#713)
## 1.4.1 -- 2019-07-03
### Fixed
- `max_icon_size` not working with dynamic width (#614)
- Failure to parse color strings with trailing comments in the config (#626)
- Negative width in geometry being ignored (#628)
- Incorrect handling of the argument terminator `--` in dunstify
- Crash when changing DPI while no notifications are displayed (#630)
- Fullscreen status change not being detected in some cases (#613)
## 1.4.0 -- 2019-03-30
### Added
- Add support to override `frame_color` via rules (#498)
- Support for round corners (#420)
- Ability to reference `$HOME` in icon paths with `~/` (#520)
- Support to customize the mouse bindings (#530)
- Command to toggle pause status (#535)
- Ability to automatically replace similar notifications (like volume changes)
via `stack_tag` (#552)
- Comparison of raw icons for duplicate notifications (#571)
- Introduce new desktop-entry filter (#470)
- `fullscreen` rule to hide notifications when a fullscreen window is active (#472)
- Added `skip_display` rule option to skip initial notification display, and
include the notification in the history. (#590)
### Fixed
- Notification age not counting the time while the computer was suspended (#492)
- Dunst losing always-on-top status on a window manager restart (#160)
- Xpm icons not being recognized
- When new notifications arrive, but display is full, important notifications don't
have to wait for a timeout in a displayed notification (#541)
- Dunst hanging while the context menu is open (#456)
- Having & inside a notification breaking markup (#546)
- ` more` notifications don't occupy space anymore, if there is only a single
notification waiting to get displayed. The notification gets displayed directly (#467)
- Segfault when comparing icon name with a notification with a raw icon (#536)
- Icon size can no longer be larger than the notification when a fixed width is specified (#540)
### Changed
- Transient notifications no longer skip history by default (#508)
- The notification summary no longer accepts markup (#497)
### Removed
- Dependency on libxdg-basedir (#550)
## 1.3.2 -- 2018-05-06
### Fixed
- Crash when trying to load an invalid or corrupt icon (#512)
## 1.3.1 -- 2018-01-30
### Fixed
- Race condition resulting in the service files being empty (#488)
## 1.3.0 -- 2018-01-05
### Added
- `ellipsize` option to control how long lines should be ellipsized when `word_wrap` is set to `false` (#374)
- A beginning tilde of a path is now expanded to the home of the current user (#351)
- The image-path hint is now respected, as GApplications send their icon only via this link (#447)
- The (legacy) image\_data hint is now respected (#353)
- If dunst can't acquire the DBus name, dunst prints the PID of the process holding the name (#458 #460)
- Increased accuracy of timeouts by using microseconds internally (#379 #291)
- Support for specifying timeout values in milliseconds, minutes, hours, or days. (#379)
- Support for HTML img tags (via context menu) (#428)
### Fixed
- `new_icon` rule being ignored on notifications that had a raw icon (#423)
- Format strings being replaced recursively in some cases (#322 #365)
- DBus related memory leaks (#397)
- Crash on X11 servers with RandR support less than 1.5. (#413 #364)
- Silently reading the default config file, if `-conf` did not specify a valid file (#452)
- Notification window flickering when a notification is replaced (#320 #415)
- Inaccurate timeout in some cases (#291 #379)
### Changed
- Transient hints are now handled (#343 #310)
An additional rule option (`match_transient` and `set_transient`) is added
to optionally reset the transient setting
- HTML links are now referred to by their text in the context menu rather than numbers (#428)
- `icon_folders` setting renamed to `icon_path` (#170)
- `config.def.h` and `config.h` got merged (#371)
- The dependency on GTK3+ has been removed. Instead of GTK3+, dunst now
requires gdk-pixbuf which had been a transient dependency before. (#334
#376)
- The `_GNU_SOURCE` macros had been removed to make dunst portable to nonGNU systems (#403)
- Internal refactorings of the notification queue handling. (#411)
- Dunst does now install the systemd and dbus service files into their proper location given
by pkg-config. Use `SERVICEDIR_(DBUS|SYSTEMD)` params to overwrite them. (#463)
## 1.2.0 -- 2017-07-12
### Added
- `always_run_script` option to run script even if a notification is suppressed
- Support for more icon file types
- Support for raw icons
- `hide_duplicate_count` option to hide the number of duplicate notifications
- Support for per-urgency frame colours
- `markup` setting for more fine-grained control over how markup is handled
- `history_ignore` rule action to exclude a notification from being added to the history
- Support for setting the dpi value dunst will use for font rendering via the `Xft.dpi` X resource
- Experimental support for per-monitor dpi calculation
- `max_icon_size` option to scale down icons if they exceed a certain size
- Middle click on notifications can be used to trigger actions
- Systemd service file, installed by default
- `%n` format flag for getting progress value without any extra characters
### Changed
- Text and icons are now centred vertically
- Notifications aren't considered duplicate if urgency or icons differ
- The maximum length of a notification is limited to 5000 characters
- The frame width and color settings were moved to the global section as `frame_width` and `frame_color` respectively
- Dropped Xinerama in favour of RandR, Xinerama can be enabled with the `-force_xinerama` option if needed
### Deprecated
- `allow_markup` is deprecated with `markup` as its replacement
- The urgency specific command line flags have been deprecated with no replacement, respond to issue #328 on the bug tracker if you depend on them
### Fixed
- Infinite loop if there are 2 configuration file sections with the same name
- URLs with dashes and underscores in them are now parsed properly
- Many memory leaks
- Category based rules were applied without actually matching
- dmenu command not parsing quoted arguments correctly
- Icon alignment with dynamic width
- Issue when loading configuration files with very long lines
- '\n' is no longer expanded to a newline inside notification text
- Notification window wasn't redrawn if obscured on systems without a compositor
- `ignore_newline` now works regardless of the markup setting
- dmenu process being left as a zombie if no option was selected
- Crash when opening urls parsed from `` tags
## 1.1.0 -- 2014-07-29
- fix nasty memory leak
- icon support (still work in progress)
- fix issue where keybindings aren't working when numlock is activated
## 1.0.0 -- 2013-04-15
- use pango/cairo as drawing backend
- make use of pangos ability to parse markup
- support for actions via context menu
- indicator for actions/urls found
- use blocking I/O. No more waking up the CPU multiple times per second to check for new dbus messages
## 0.5.0 -- 2013-01-26
- new default dunstrc
- frames for window
- trigger scripts on matching notifications
- context menu for urls (using dmenu)
- pause and resume function
- use own code for ini parsing (this removes inih)
- progress hints
## 0.4.0 -- 2012-09-27
- separator between notifications
- word wrap long lines
- real transparance
- bouncing text (alternative to word_wrap)
- new option for line height
- better multihead support
- don't die when keybindings can't be grabbed
- bugfix: forgetting geometry
- (optional) static configuration
## 0.3.1 -- 2012-08-02
- fix -mon option
## 0.3.0 -- 2012-07-30
- full support for Desktop Notification Specification (mandatory parts)
- option to select monitor on which notifications are shown
- follow focus
- oneline mode
- text alignment
- show age of notifications
- sticky history
- filter duplicate messages
- keybinding to close all notifications
- new way to specify keybindings
- cleanup / bugfixes etc.
- added dunst.service
## 0.2.0 -- 2012-06-26
- introduction of dunstrc
- removed static configuration via config.h
- don't timeout when user is idle
- xft-support
- history (a.k.a. redisplay old notifications)
dunst-1.12.2/HACKING.md 0000664 0000000 0000000 00000011344 14762024016 0014325 0 ustar 00root root 0000000 0000000 # Important notes on the code
**You can generate an internal overview with doxygen. For this, use `make doc-doxygen` and you'll find an internal overview of all functions and symbols in `docs/internal/html`. You will also need `graphviz` for this.**
For people wanting to develop new features or fix bugs for dunst, here are the
steps you should take.
# Running dunst
For building dunst, you should take a look at the README. After dunst is built,
you can run it with:
./dunst
This might not work, however, since dunst will abort when another instance of
dunst or another notification daemon is running. You will see a message like:
CRITICAL: [dbus_cb_name_lost:1044] Cannot acquire 'org.freedesktop.Notifications': Name is acquired by 'dunst' with PID '20937'.
So it's best to kill any running instance of dunst before trying to run the
version you just built. You can do that by making a shell function as follows
and put it in your bashrc/zshrc/config.fish:
```sh
run_dunst() {
if make -j dunst; then
pkill dunst
else
return 1
fi
./dunst $@
}
```
If you run this function is the root directory of the repository, it will build
dunst, kill any running instances and run your freshly built version of dunst.
# Testing dunst
To test dunst, it's good to know the following commands. This way you can test
dunst on your local system and you don't have to wait for CI to finish.
## Run test suite
This will build dunst if there were any changes and run the test suite. You will
need `awk` for this to work (to color the output of the tests).
make test
## Run memory leak tests
This will build dunst if there were any changes and run the test suite with
valgrind to make sure there aren't any memory leaks. You will have to build your
tests so that they free all allocated memory after you are done, otherwise this
test will fail. You will need to have `valgrind` installed for this.
make test-valgrind
## Build the doxygen documentation
The internal documentation can be built with (`doxygen` and `graphviz` required):
make doc-doxygen
To open them in your browser you can run something like:
firefox docs/internal/html/index.html
# Running the tests with docker
Dunst has a few docker images for running tests on different distributions. The
documentation for this can be found at https://github.com/dunst-project/docker-images
# Comments
- Comment system is held similar to JavaDoc
- Use `@param` to describe all input parameters
- Use `@return` to describe the output value
- Use `@retval` to describe special return values (like `NULL`)
- Documentation comments should start with a double star (`/**`)
- Append `()` to function names and prepend variables with `#` to properly reference them in the docs
- Add comments to all functions and methods
- Markdown inside the comments is allowed and also desired
- Add the comments to the prototype. Doxygen will merge the protoype and implementation documentation anyways.
Except for **static** methods, add the documentation header to the implementation and *not to the prototype*.
- Member documentation should happen with `/**<` and should span to the right side of the member
- Test files that have the same name as a file in src/\* can include the
associated .c file. This is because they are being compiled INSTEAD of the src
file.
## Log messages
### Messages
- Keep your message in common format: `: `
- If you have to write text, single quote values in your sentence.
### Levels
For logging, there are printf-like macros `LOG_(E|C|W|M|I|D)`.
- `LOG_E` (ERROR):
- All messages, which lead to immediate abort and are caused by a programming error. The program needs patching and the error is not user recoverable.
- e.g.: Switching over an enum, `LOG_E` would go into the default case.
- `LOG_C` (CRITICAL):
- The program cannot continue to work. It is used in the wrong manner or some outer conditions are not met.
- e.g.: `-config` parameter value is unreadable file
- `DIE` (CRITICAL):
- A shorthand for `LOG_C` and terminating the program after. This does not dump the core (unlike `LOG_E`).
- `LOG_W` (WARNING):
- Something is not in shape, but it's recoverable.
- e.g.: A value is not parsable in the config file, which will default.
- `LOG_M` (MESSAGE):
- Important info, which informs about the state.
- e.g.: An empty notification does get removed immediately.
- `LOG_I` (INFO):
- Mostly unneccessary info, but important to debug (as the user) some use cases.
- e.g.: print the notification contents after arriving
- `LOG_D` (DEBUG):
- Only important during development or tracing some bugs (as the developer).
dunst-1.12.2/LICENSE 0000664 0000000 0000000 00000003016 14762024016 0013741 0 ustar 00root root 0000000 0000000 Copyright Β© 2013, Sascha Kruse and contributors
All rights reserved.
All files (unless otherwise noted) are licensed under the BSD license:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Sascha Kruse nor the
names of contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY Sascha Kruse ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL Sascha Kruse BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
dunst-1.12.2/Makefile 0000664 0000000 0000000 00000027126 14762024016 0014404 0 ustar 00root root 0000000 0000000 # dunst - Notification-daemon
# See LICENSE file for copyright and license details.
include config.mk
VERSION := "1.12.2 (2025-03-05)"
ifneq ($(wildcard ./.git/),)
VERSION := $(shell ${GIT} describe --tags 2>/dev/null || echo ${VERSION})
endif
SYSTEMD ?= $(shell $(PKG_CONFIG) --silence-errors ${SYSTEMDAEMON} || echo 0)
ifneq (0,${WAYLAND})
DATA_DIR_WAYLAND_PROTOCOLS ?= $(shell $(PKG_CONFIG) wayland-protocols --variable=pkgdatadir)
DATA_DIR_WAYLAND_PROTOCOLS := ${DATA_DIR_WAYLAND_PROTOCOLS}
ifeq (,${DATA_DIR_WAYLAND_PROTOCOLS})
$(warning "Failed to query $(PKG_CONFIG) for package 'wayland-protocols'!")
endif
endif
LIBS := $(shell $(PKG_CONFIG) --libs ${pkg_config_packs})
INCS := $(shell $(PKG_CONFIG) --cflags ${pkg_config_packs})
ifneq (clean, $(MAKECMDGOALS))
ifeq ($(and $(INCS),$(LIBS)),)
$(error "$(PKG_CONFIG) failed!")
endif
endif
SYSCONF_FORCE_NEW ?= $(shell [ -f ${DESTDIR}${SYSCONFFILE} ] || echo 1)
ifneq (0,${DUNSTIFY})
DUNSTIFY_CFLAGS := ${DEFAULT_CFLAGS} ${CFLAGS} ${CPPFLAGS} $(shell $(PKG_CONFIG) --cflags libnotify)
DUNSTIFY_LDFLAGS := ${DEFAULT_LDFLAGS} ${LDFLAGS} $(shell $(PKG_CONFIG) --libs libnotify)
endif
CPPFLAGS := ${DEFAULT_CPPFLAGS} ${CPPFLAGS}
CFLAGS := ${DEFAULT_CFLAGS} ${CFLAGS} ${INCS} -MMD -MP
LDFLAGS := ${DEFAULT_LDFLAGS} ${LDFLAGS} ${LIBS}
SRC := $(sort $(shell ${FIND} src/ ! \( -path src/wayland -prune -o -path src/x11 -prune \) -name '*.c'))
ifneq (0,${WAYLAND})
# with Wayland support
CPPFLAGS += -DHAVE_WL_CURSOR_SHAPE -DHAVE_WL_EXT_IDLE_NOTIFY
SRC += $(sort $(shell ${FIND} src/wayland -name '*.c'))
endif
ifneq (0,${X11})
SRC += $(sort $(shell ${FIND} src/x11 -name '*.c'))
endif
ifeq (0,${X11})
ifeq (0,${WAYLAND})
$(error You have to compile at least one output (X11, Wayland))
endif
endif
OBJ := ${SRC:.c=.o}
TEST_SRC := $(sort $(shell ${FIND} test/ -name '*.c'))
TEST_OBJ := $(TEST_SRC:.c=.o)
DEPS := ${SRC:.c=.d} ${TEST_SRC:.c=.d}
.PHONY: all debug
all: doc dunst service
debug: CPPFLAGS += ${CPPFLAGS_DEBUG}
debug: CFLAGS += ${CFLAGS_DEBUG}
debug: LDFLAGS += ${LDFLAGS_DEBUG}
debug: all
-include $(DEPS)
${OBJ} ${TEST_OBJ}: Makefile config.mk
DATE_FMT = +%Y-%m-%d
ifdef SOURCE_DATE_EPOCH
BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)")
else
BUILD_DATE ?= $(shell date "$(DATE_FMT)")
endif
src/dunst.o: src/dunst.c
${CC} -o $@ -c $< ${CPPFLAGS} ${CFLAGS} \
-D_CCDATE="${BUILD_DATE}" -D_CFLAGS="$(filter-out $(filter -I%,${INCS}),${CFLAGS})" -D_LDFLAGS="${LDFLAGS}"
%.o: %.c
${CC} -o $@ -c $< ${CPPFLAGS} ${CFLAGS}
dunst: ${OBJ} main.o
${CC} -o ${@} ${OBJ} main.o ${CFLAGS} ${LDFLAGS}
ifneq (0,${DUNSTIFY})
all: dunstify
dunstify: dunstify.o
${CC} -o ${@} dunstify.o ${DUNSTIFY_CFLAGS} ${DUNSTIFY_LDFLAGS}
endif
.PHONY: test test-valgrind test-coverage functional-tests
test: test/test clean-coverage-run
# Make sure an error code is returned when the test fails
/usr/bin/env bash -c 'set -euo pipefail;\
TESTDIR=./test ./test/test -v | ./test/greenest.awk '
test-valgrind: test/test
TESTDIR=./test ${VALGRIND} \
--suppressions=.valgrind.suppressions \
--leak-check=full \
--show-leak-kinds=definite \
--errors-for-leak-kinds=definite \
--num-callers=40 \
--error-exitcode=123 \
./test/test -v
test-coverage: CFLAGS += -fprofile-arcs -ftest-coverage -O0
test-coverage: test
test-coverage-report: test-coverage
mkdir -p docs/internal/coverage
${GCOVR} \
-r . \
--exclude=test \
--html \
--html-details \
-o docs/internal/coverage/index.html
test/%.o: test/%.c src/%.c
${CC} -o $@ -c $< ${CFLAGS} ${CPPFLAGS}
test/test: ${OBJ} ${TEST_OBJ}
${CC} -o ${@} ${TEST_OBJ} $(filter-out ${TEST_OBJ:test/%=src/%},${OBJ}) ${CFLAGS} ${LDFLAGS}
functional-tests: dunst dunstify
PREFIX=. ./test/functional-tests/test.sh
.PHONY: doc doc-doxygen
doc: docs/dunst.1 docs/dunst.5 docs/dunstctl.1 docs/dunstify.1
# Can't dedup this as we need to explicitly provide the name and title text to
# pod2man :(
docs/dunst.1: docs/dunst.1.pod
${SED} "s|##SYSCONFDIR##|${SYSCONFDIR}|" $< | ${POD2MAN} --name=dunst -c "Dunst Reference" --section=1 --release=${VERSION} > $@
docs/dunst.5: docs/dunst.5.pod
${POD2MAN} --name=dunst -c "Dunst Reference" --section=5 --release=${VERSION} $< > $@
docs/dunstctl.1: docs/dunstctl.pod
${POD2MAN} --name=dunstctl -c "dunstctl reference" --section=1 --release=${VERSION} $< > $@
docs/dunstify.1: docs/dunstify.pod
${POD2MAN} --name=dunstify -c "dunstify reference" --section=1 --release=${VERSION} $< > $@
doc-doxygen:
${DOXYGEN} docs/internal/Doxyfile
.PHONY: service service-dbus service-systemd wayland-protocols
service: service-dbus
service-dbus:
@${SED} "s|##PREFIX##|$(PREFIX)|" org.knopwob.dunst.service.in > org.knopwob.dunst.service
ifneq (0,${SYSTEMD})
service: service-systemd
service-systemd:
@${SED} "s|##PREFIX##|$(PREFIX)|" dunst.systemd.service.in > dunst.systemd.service
endif
ifneq (0,${WAYLAND})
wayland-protocols: src/wayland/protocols/wlr-layer-shell-unstable-v1.xml src/wayland/protocols/wlr-foreign-toplevel-management-unstable-v1.xml
# TODO: write this shorter
mkdir -p src/wayland/protocols
wayland-scanner private-code ${DATA_DIR_WAYLAND_PROTOCOLS}/stable/xdg-shell/xdg-shell.xml src/wayland/protocols/xdg-shell.h
wayland-scanner client-header ${DATA_DIR_WAYLAND_PROTOCOLS}/stable/xdg-shell/xdg-shell.xml src/wayland/protocols/xdg-shell-client-header.h
wayland-scanner client-header src/wayland/protocols/wlr-layer-shell-unstable-v1.xml src/wayland/protocols/wlr-layer-shell-unstable-v1-client-header.h
wayland-scanner private-code src/wayland/protocols/wlr-layer-shell-unstable-v1.xml src/wayland/protocols/wlr-layer-shell-unstable-v1.h
wayland-scanner client-header src/wayland/protocols/idle.xml src/wayland/protocols/idle-client-header.h
wayland-scanner private-code src/wayland/protocols/idle.xml src/wayland/protocols/idle.h
wayland-scanner client-header src/wayland/protocols/wlr-foreign-toplevel-management-unstable-v1.xml src/wayland/protocols/wlr-foreign-toplevel-management-unstable-v1-client-header.h
wayland-scanner private-code src/wayland/protocols/wlr-foreign-toplevel-management-unstable-v1.xml src/wayland/protocols/wlr-foreign-toplevel-management-unstable-v1.h
# wayland-protocols >= 1.27
ifneq (,$(wildcard ${DATA_DIR_WAYLAND_PROTOCOLS}/staging/ext-idle-notify/ext-idle-notify-v1.xml))
wayland-scanner client-header ${DATA_DIR_WAYLAND_PROTOCOLS}/staging/ext-idle-notify/ext-idle-notify-v1.xml src/wayland/protocols/ext-idle-notify-v1-client-header.h
wayland-scanner private-code ${DATA_DIR_WAYLAND_PROTOCOLS}/staging/ext-idle-notify/ext-idle-notify-v1.xml src/wayland/protocols/ext-idle-notify-v1.h
endif
# wayland-protocols >= 1.32
ifneq (,$(wildcard ${DATA_DIR_WAYLAND_PROTOCOLS}/staging/cursor-shape/cursor-shape-v1.xml))
wayland-scanner client-header ${DATA_DIR_WAYLAND_PROTOCOLS}/staging/cursor-shape/cursor-shape-v1.xml src/wayland/protocols/cursor-shape-v1-client-header.h
wayland-scanner private-code ${DATA_DIR_WAYLAND_PROTOCOLS}/staging/cursor-shape/cursor-shape-v1.xml src/wayland/protocols/cursor-shape-v1.h
wayland-scanner client-header ${DATA_DIR_WAYLAND_PROTOCOLS}/unstable/tablet/tablet-unstable-v2.xml src/wayland/protocols/tablet-unstable-v2-client-header.h
wayland-scanner private-code ${DATA_DIR_WAYLAND_PROTOCOLS}/unstable/tablet/tablet-unstable-v2.xml src/wayland/protocols/tablet-unstable-v2.h
endif
endif
.PHONY: clean clean-dunst clean-dunstify clean-doc clean-tests clean-coverage clean-coverage-run clean-wayland-protocols
clean: clean-dunst clean-dunstify clean-doc clean-tests clean-coverage clean-coverage-run
clean-dunst:
rm -f dunst ${OBJ} main.o main.d ${DEPS}
rm -f org.knopwob.dunst.service
rm -f dunst.systemd.service
clean-dunstify:
rm -f dunstify.o
rm -f dunstify.d
rm -f dunstify
clean-doc:
rm -f docs/dunst.1
rm -f docs/dunst.5
rm -f docs/dunstctl.1
rm -f docs/dunstify.1
rm -fr docs/internal/html
rm -fr docs/internal/coverage
clean-tests:
rm -f test/test test/*.o test/*.d
clean-coverage: clean-coverage-run
${FIND} . -type f -name '*.gcno' -delete
${FIND} . -type f -name '*.gcna' -delete
# Cleans the coverage data before every run to not double count any lines
clean-coverage-run:
${FIND} . -type f -name '*.gcov' -delete
${FIND} . -type f -name '*.gcda' -delete
clean-wayland-protocols:
rm -f src/wayland/protocols/*.h
.PHONY: install install-dunst install-dunstctl install-dunstrc \
install-service install-service-dbus install-service-systemd \
uninstall uninstall-dunstctl uninstall-dunstrc \
uninstall-service uninstall-service-dbus uninstall-service-systemd \
uninstall-keepconf uninstall-purge
install: install-dunst install-dunstctl install-dunstrc install-service
install-dunst: dunst doc
install -Dm755 dunst ${DESTDIR}${BINDIR}/dunst
install -Dm644 docs/dunst.1 ${DESTDIR}${MANPREFIX}/man1/dunst.1
install -Dm644 docs/dunst.5 ${DESTDIR}${MANPREFIX}/man5/dunst.5
install -Dm644 docs/dunstctl.1 ${DESTDIR}${MANPREFIX}/man1/dunstctl.1
install -Dm644 docs/dunstify.1 ${DESTDIR}${MANPREFIX}/man1/dunstify.1
install-dunstctl: dunstctl
install -Dm755 dunstctl ${DESTDIR}${BINDIR}/dunstctl
ifeq (1,${SYSCONF_FORCE_NEW})
install-dunstrc:
install -Dm644 dunstrc ${DESTDIR}${SYSCONFFILE}
endif
install-service: install-service-dbus
install-service-dbus: service-dbus
install -Dm644 org.knopwob.dunst.service ${DESTDIR}${SERVICEDIR_DBUS}/org.knopwob.dunst.service
ifneq (0,${SYSTEMD})
install-service: install-service-systemd
install-service-systemd: service-systemd
install -Dm644 dunst.systemd.service ${DESTDIR}${SERVICEDIR_SYSTEMD}/dunst.service
endif
ifneq (0,${DUNSTIFY})
install: install-dunstify
install-dunstify: dunstify
install -Dm755 dunstify ${DESTDIR}${BINDIR}/dunstify
endif
ifneq (0,${COMPLETIONS})
install: install-completions
install-completions:
install -Dm644 completions/dunst.bashcomp ${DESTDIR}${BASHCOMPLETIONDIR}/dunst
install -Dm644 completions/dunstctl.bashcomp ${DESTDIR}${BASHCOMPLETIONDIR}/dunstctl
install -Dm644 completions/_dunst.zshcomp ${DESTDIR}${ZSHCOMPLETIONDIR}/_dunst
install -Dm644 completions/_dunstctl.zshcomp ${DESTDIR}${ZSHCOMPLETIONDIR}/_dunstctl
install -Dm644 completions/dunst.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunst.fish
install -Dm644 completions/dunstctl.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunstctl.fish
ifneq (0,${DUNSTIFY})
install: install-completions-dunstify
install-completions-dunstify:
install -Dm644 completions/dunstify.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunstify.fish
endif
endif
uninstall: uninstall-keepconf
uninstall-purge: uninstall-keepconf uninstall-dunstrc
uninstall-keepconf: uninstall-service uninstall-dunstctl uninstall-completions
rm -f ${DESTDIR}${BINDIR}/dunst
rm -f ${DESTDIR}${BINDIR}/dunstify
rm -f ${DESTDIR}${MANPREFIX}/man1/dunst.1
rm -f ${DESTDIR}${MANPREFIX}/man5/dunst.5
rm -f ${DESTDIR}${MANPREFIX}/man1/dunstctl.1
rm -f ${DESTDIR}${MANPREFIX}/man1/dunstify.1
uninstall-dunstrc:
rm -f ${DESTDIR}${SYSCONFFILE}
rmdir --ignore-fail-on-non-empty ${DESTDIR}${SYSCONFDIR}/dunst
uninstall-dunstctl:
rm -f ${DESTDIR}${BINDIR}/dunstctl
uninstall-service: uninstall-service-dbus
uninstall-service-dbus:
rm -f ${DESTDIR}${SERVICEDIR_DBUS}/org.knopwob.dunst.service
ifneq (0,${SYSTEMD})
uninstall-service: uninstall-service-systemd
uninstall-service-systemd:
rm -f ${DESTDIR}${SERVICEDIR_SYSTEMD}/dunst.service
endif
uninstall-completions:
rm -f ${DESTDIR}${BASHCOMPLETIONDIR}/dunst
rm -f ${DESTDIR}${BASHCOMPLETIONDIR}/dunstctl
rm -f ${DESTDIR}${ZSHCOMPLETIONDIR}/_dunst
rm -f ${DESTDIR}${ZSHCOMPLETIONDIR}/_dunstctl
rm -f ${DESTDIR}${FISHCOMPLETIONDIR}/dunst.fish
rm -f ${DESTDIR}${FISHCOMPLETIONDIR}/dunstctl.fish
rm -f ${DESTDIR}${FISHCOMPLETIONDIR}/dunstify.fish
dunst-1.12.2/README.md 0000664 0000000 0000000 00000021554 14762024016 0014222 0 ustar 00root root 0000000 0000000 [](https://github.com/dunst-project/dunst/actions?query=workflow%3Amain) [](https://codecov.io/gh/dunst-project/dunst)
# Dunst
A highly configurable and lightweight notification daemon.

## Table of Contents
- [Features](#features)
- [Building](#building)
- [Contributing](#contributing)
- [Documentation](#documentation)
- [Troubleshooting](#troubleshooting)
- [Copyright](#copyright)
# Features
## βοΈ Highly customizable
Customize fonts, icons, timeouts, and more. Are you unhappy with the default
shortcuts and colors? No worries, you can change these all with a simple
configuration file tweak.
_click the images to see the dunstrc_
## π Scripting
Run custom scripts on notifications matching a specified pattern. Have espeak
read out your notifications, or play a song when your significant other signs on
in pidgin!
## π Rules
Change the look or behavior of notifications matching a specified pattern. You
could use this to change the color of message notifications from your favorite
jabber buddies, or to prevent important work email notifications from
disappearing until you manually dismiss them.
## βΈοΈ Pause
If you want to take a break and not receive any notifications for a while, just
pause dunst. All notifications will be saved for you to catch up
later.
Additionally, you can set a numeric pause level, which allows you to pause dunst
selectively for some notifications, where more urgent notifications get through,
but less urgent stay paused.
## π History
Catch an unread notification disappearing from the corner of your eye? Just tap
a keyboard shortcut to replay the last notification, or continue tapping to see
your notification history.
# Documentation
Most documentation can be found in dunst's man pages. In
[**dunst(1)**](docs/dunst.1.pod) contains some general instructions on how
to run dunst and in
[**dunst(5)**](docs/dunst.5.pod) all of dunst's configuration options are
explained.
On the dunst [wiki][wiki] you can find guides and installation instructions and
on the dunst [website][website] there is a [FAQ][FAQ] with common issues.
## Installation
Dunst is available in many package repositories. If it's not available in your
distro's repositories, don't worry, it's not hard to build it yourself.
### Dependencies
- dbus (runtime)
- libxinerama
- libxrandr
- libxss
- glib
- pango/cairo
- gdk-pixbuf
- libnotify (can build without, for dunstify, see [make parameters](#make-parameters))
- wayland-client (can build without, see [make parameters](#make-parameters))
- wayland-protocols (optional, for recompiling protocols)
- xdg-utils (optional, xdg-open is the default 'browser' for opening URLs)
- jq (optional, for installed completions and tools in contrib)
- busctl (optional, for dunstctl rules and dunstctl history)
The names will be different depending on your [distribution](https://github.com/dunst-project/dunst/wiki/Dependencies).
### Building
```
git clone https://github.com/dunst-project/dunst.git
cd dunst
make
sudo make install
```
### Make parameters
- `DESTDIR=`: Set the destination directory of the installation. (Default: `/`)
- `PREFIX=`: Set the prefix of the installation. (Default: `/usr/local`)
- `BINDIR=`: Set the `dunst` executable's path (Default: `${PREFIX}/bin`)
- `DATADIR=`: Set the path for shared files. (Default: `${PREFIX}/share`)
- `BASHCOMPLETIONDIR=`: Set the path for installation of bash completion files. (Default: `${DATADIR}/bash-completion/completions`)
- `FISHCOMPLETIONDIR=`: Set the path for installation of fish completion files. (Default: `${DATADIR}/fish/vendor_completions.d`)
- `ZSHCOMPLETIONDIR=`: Set the path for installation of zsh completion files. (Default: `${DATADIR}/zsh/site-functions`)
- `SYSCONFDIR=`: Set the base directory for system config files. (Default: `${PREFIX}/etc/xdg`)
- `SYSCONFFILE=`: Set the absolute path to which the default dunstrc shall be installed. (Default: `${SYSCONFDIR}/dunst/dunstrc`)
- `SYSCONF_FORCE_NEW=(0|1)`: Overwrite existing `${SYSCONFFILE}`. (Default: 0 (don't overwrite))
- `MANDIR=`: Set the prefix of the manpage. (Default: `${DATADIR}/man`)
- `SYSTEMD=(0|1)`: Disable/Enable the systemd unit. (Default: autodetect systemd)
- `WAYLAND=(0|1)`: Disable/Enable wayland support. (Default: 1 (enabled))
- `X11=(0|1)`: Disable/Enable X11 support. (Default: 1 (enabled))
- `DUNSTIFY=(0|1)`: Disable/Enable the libnotify dunstctl utility. (Default: 1 (enabled))
- `COMPLETIONS=(0|1)`: Disable/Enable installation of shell completions. (Default: 1 (enabled))
- `SERVICEDIR_SYSTEMD=`: The path to put the systemd user service file. Unused, if `SYSTEMD=0`. (Default: `${PREFIX}/lib/systemd/user`)
- `SERVICEDIR_DBUS=`: The path to put the dbus service file. (Default: `${DATADIR}/dbus-1/services`)
- `EXTRA_CFLAGS=`: Additional flags for the compiler.
**Make sure to run all make calls with the same parameter set. So when building with `make PREFIX=/usr`, you have to install it with `make PREFIX=/usr install`, too.**
**Either X11 or WAYLAND should be set, otherwise dunst will not compile.**
**Notes on default of XDG_CONFIG_DIRS**
Dunst uses a different default (`${SYSCONFDIR}`) for XDG_CONFIG_DIRS at runtime.
This is a slight digression from the recommended value in the XDG Base Directory
Specification (/etc/xdg), because the default config file gets installed to
`${SYSCONFDIR}/dunst/dunstrc` to avoid conflicts with /etc/xdg/dunst/dunstrc which
might have been installed from a distribution repository. If you do want dunst
to use the spec's recommended default, set XDG_CONFIG_DIR=/etc/xdg at runtime or
SYSCONFDIR=/etc/xdg at compile time.
**Notes on SYSCONFFILE**
Changing SYSCONFFILE does not affect the search for config files, meaning it
will not take effect if you choose to install dunstrc to a location that cannot
be found by the algorithm outlined in the FILES section of dunst(1).
`make install` will not overwrite an already existing ${SYSCONFFILE} (i.e.
/usr/local/etc/xdg/dunst/dunstrc), see SYSCONF_FORCE_NEW above. This is so you
do not lose local changes to said file on upgrade. However, it is recommended
to leave that file untouched and use a more important config location to
override settings, see the FILES section in dunst(1) for more details.
`make uninstall` will not remove ${SYSCONFFILE}, use `make uninstall-purge` if
you do want it removed as well.
## Contributing
Contributions are very welcome. Before contributing, make sure to look at the
contribution documentation in [HACKING.md](./HACKING.md).
Make sure you test your code and where possible add automated tests. These
tests are also checked on memory leaks (with `make test-valgrind`).
## Troubleshooting
### Cannot set settings via command line
This functionality was removed during the refactor. It might be re-added later
in some form. See [#940](https://github.com/dunst-project/dunst/issues/940) for
details.
## Bug reports
Please use the [issue tracker][issue-tracker] provided by GitHub to send us bug reports or feature requests.
## Screenshots
## Maintainers
- [Friso Smit](https://github.com/fwsmit)
- [Bjoern Hiller](https://github.com/zappolowski)
- [Federico Angelilli](https://github.com/bynect)
Please only refer to active maintainers for issues and bugs.
## Ex-Maintainers
- [Nikos Tsipinakis](https://github.com/tsipinakis)
- [Benedikt Heine](https://github.com/bebehei)
## Author
Written by Sascha Kruse
## Copyright
Copyright 2013 Sascha Kruse and contributors (see [`LICENSE`](./LICENSE) for licensing information)
[issue-tracker]: https://github.com/dunst-project/dunst/issues
[wiki]: https://github.com/dunst-project/dunst/wiki
[website]: https://dunst-project.org
[FAQ]: https://dunst-project.org/faq
dunst-1.12.2/RELEASE_NOTES 0000664 0000000 0000000 00000050043 14762024016 0014711 0 ustar 00root root 0000000 0000000 ===================================================================================
Release Notes For v1.12.2
===================================================================================
This is the first release of 2025 and comes with an important fix to
dunstify. With the roll out of libnotify v0.8.4, older version of dunstify
started to not compile or crash when using the -r flag.
If your distribution has updated libnotify, you should update dunstify as soon
as possible to resolve these issues.
Other changes include the addition of three dbus signals, the --category
option for dunstify, the use of SOURCE_DATE_EPOCH for reproducible builds.
For more details take a look at the changelog for all the fixes and improvements.
===================================================================================
Release Notes For v1.12.0
===================================================================================
There have been many important contributions in the last few months.
Some notable changes are: adding hot-reload for the configuration, exporting
rules via dunstctl, adding color gradients, removing default hard-coded icons.
For detailed information consult the changelog.
Important notice for all users:
The behaviour of the setting `height` has been changed in a breaking way.
Before you could specify a single value that would be used as the max height
of a notification. In this release the dynamic height was implemented to make
this settings behave more similarly to `width`.
Now the values accepted are either a single number (for a *fixed height*) or
a tuple of numbers (for a min/max range).
The way of specifying a maximum height before was:
height = 300
The equivalent way now is:
height = (0, 300)
Furthermore the preferred syntax for the `offset` settings has been changed
from NxN to (N,N). The old syntax is supported nevertheless.
If you are a maintainer it would be helpful to include the message above when
an user updates from an older version of dunst.
Take a look at the changelog for all the bug fixes and improvements.
===================================================================================
Release Notes For v1.11.0
===================================================================================
This release hopefully marks the start of a new period of active development and
contributions and a shift away from the previous lower maintenance mode.
For users:
This is the perfect time to engage with the project and other dunst users.
Some of the features and changes to include in the v2 release are starting to
be proposed or implemented. Everyone's opinion is important, so feel free
to participate in the issues proposing new features (or redesigns of the old ones).
This version mainly contains bug fixes and QoL improvements, and can be considered
a preparatory release for the various things that will come in the future
(overhaul of the rule syntax, multiple windows support, aesthetic and customization
options, refactor of the drawing system, etc).
For maintainers:
X11 support is now optional and can be disabled in build by setting the `X11` make
flag to 0. This means that you can offer Wayland-only builds.
Shell completions are now considered official and can be installed/uninstalled from
the Makefile. By default they are installed and can be disabled by setting the
`COMPLETIONS` flag to 0.
Take a look at the changelog for all the bug fixes and improvements.
===================================================================================
Release Notes For v1.10.0
===================================================================================
It's been a while since the last release. That does not mean that the
development has been stagnant. There are some long requested features have been
implemented, like a do not disturb mode in the form of multiple pause levels.
You can specify the priority of notification and selectively pause them. The
progress bar rendering for low progress values has been fixed, with preparation
work being done for more progress bar customization.
Since dunst gained Wayland support, Wayland received a lot of development.
Dunst needed to do some catchup for that. A new Wayland idle protocol is
implemented and support for Wayland touch screens and multi-seat has been
added. It's now also possible to specify displays by their port name, instead
of number.
Take a look at the changelog for all the bug fixes and improvements.
===================================================================================
Release Notes For v1.9.2
===================================================================================
This release fixes two issues with high cpu usage one of which was introduced
when trying to fix another cpu usage issue. So if you have experienced dunst
making your fans spin harder than usual that should be fixed with this release.
===================================================================================
Release Notes For v1.9.1
===================================================================================
For users:
If you like rounded corners, this release is for you. You can now add rounded
corners to your progress bar and notification icons. Dunstctl added more
options for changing the notification history, so I'm excited for what you can
build with that. Dunst also is even more stable now with a crash being fixed
and not using 100% of your cpu anymore in some situations.
For maintainers:
Libnotify and dunst are now optional to build by setting the `DUNSTIFY` make
flag to 0. (enabled by default)
Take a look at the changelog for a more detailed change description.
===================================================================================
Release Notes For v1.9.0
===================================================================================
This release marks the point for a few big features to be useable. The
recursive icon lookup is marked stable and is used by default for new users. It
is now also possible to add gaps between notifications, although it is not done
with separate windows, so clicks in between notification will not register to
the below window. You'll also need a compositor for the transparancy to take
effect.
Take a look at the changelog for a more detailed change description.
===================================================================================
Release Notes For v1.8.0
===================================================================================
Lots of exciting and useful features are being added to dunst, all while making
dunst even more configurable and reliable.
For users:
This release re-adds the keyboard shortcuts for those who have been missing
them. Also, support for drop-in files has been implemented. Files placed in
dunstrc.d/*.conf will be read after the main dunstrc. This may be useful for
theming (with pywal or otherwise). In the future we will add example drop-in
files for different default themes and special configuration.
For maintainers:
Not much has been changed for maintainers. Maybe you'll find the drop-in files
useful for distro-specific fixes. Note that only the files in the directory of
the used dunstrc will be read (see dunst(1) for documentation).
===================================================================================
Release Notes For v1.7.0
===================================================================================
This release was long overdue. There have been a lot of changes in the mean
time. For a full list of changes, see the changelog.
For users:
The wayland support of v1.6.0 was already pretty good, but this release added
fullscreen detection and improved the stability.
This release added a few improvements to the wayland support. Dunst now
automatically falls back to X11 when the wayland compositor doesn't support the
neccesary protocols.
For maintainers:
Previously the readme said dunst depended on GTK3, which hasn't been the case
for a while. Make sure that GTK3 is not included as a dependency.
The default program for opening URL's in notifications has been changed from
firefox to xdg-open.
The Makefile and dunstrc searching has been significantly changed to be more
compliant with the XDG spec. The default config directory, `SYSCONFDIR`, has
been changed from "/etc" to "${PREFIX}/etc/xdg/". To change back to the old
behaviour, run make with: `make SYSCONFDIR="/etc"` (make sure to pass the same
variables to make in subsequent calls). Take a look at the "Make parameters"
section of the readme and the FILES section of the man page for more details.
===================================================================================
Release Notes For v1.6.0
===================================================================================
For users:
At long last, dunst has native wayland support. On startup dunst will now
autodetect the display environment it's run on and use the appropriate backend
(X11 or wayland).
Additionally, support for progress bars has been added when the 'value' hint is
used. Try it out with `notify-send -h int:value:70 'Progress bars!'`
Last but most importantly, support for the
`DUNST_COMMAND_{PAUSE,RESUME,TOGGLE}` has been removed as they could
potentially be used to DoS dunst. `dunstctl` has been available as a direct
replacement for the use-case they served since last release. See
https://github.com/dunst-project/dunst/pull/830 for details
For maintainers:
Dunst now depends on the wayland libraries and (optionally) on the
wayland-protocols package. A global configuration file is now installed by
default in `/etc/dunst/dunstrc`
===================================================================================
Release Notes For v1.5.0
===================================================================================
For users:
The most important update from the previous version is the addition of the
dunstctl command and dunstify utility, a drop-in notify-send replacement (which
existed for a while, but wasn't installed by default).
The internal keyboard shortcut support in dunst is now considered deprecated
and should be replaced by dunstctl calls. You can use the configuration of your
WM or DE to bind these to shortcuts of your choice.
Additionally, another long requested feature implemented is RGBA/transparency
support. Given an active compositor you can now add an optional transparency
component to all colors in #RRGGBBAA format.
For maintainers:
As mentioned above, two new binaries are now installed by default, dunstctl and dunstify.
libnotify has been added as a dependency as it's used internally by dunstify.
===================================================================================
Release Notes For v1.4.0
===================================================================================
There has been significant internal refactoring since the last release which
might have introduced some new bugs. Be sure to report anything you find.
However, as usual, there has been a lot of bug-fixing and a lot of new features
have been added as well. Look at the full changelog for a breakdown.
Some important points to note:
For users:
* Behavioural changes
In the previous release we introduced support for clients to mark
notifications as 'transient'. Transient notifications used to 1) bypass
idle_threshold and 2) not be saved in history.
The latter behaviour has been disabled by default and can be re-created using
rules if necessary. Transient notifications will now only bypass
idle_threshold.
Additionally, to be compliant with the notification spec, the notification
summary no longer accepts markup.
For maintainers:
* Dependency on libxdg-basedir has been removed
===================================================================================
Release Notes For v1.3.0
===================================================================================
Version 1.3 is supposed to be fully backwards compatible with 1.2.
For users:
* Behavioural changes
Dunst respects the timeout with millisecond accuracy now. Notifications with
a one second timeout are not shown up to three seconds.
Additionally you can specify timeout values in milliseconds, seconds, minutes,
hours or days using the ms, s, h, or d suffix in the config value
respectively.
Transient notifications time out ignoring the `idle_threshold` setting and are not
saved in history. This can be overridden with a rule containing `set_transient = no`.
In the same vein there is the `match_transient` condition to match transient
notifications via rules.
A prefixed tilde (`~/`) in path settings (browser, dmenu, script) is interpreted as the
home folder of the user.
* Configuration Options
`icon_folders` got deprecated and renamed to `icon_path`. `icon_folders` is still
supported, but will get removed in future.
The option `ellipsize` got introduced. It controls where to ellipsize the text of
an overlong notification if `word_wrap = no`.
For maintainers:
* Dependencies
The GTK3+ dependency got removed. Instead of this gdk-pixbuf is required
explicitly. This had been a transient dependency before.
In the Makefile, libxrandr is now specified to require version 1.5 or newer.
The dependency on libxrandr >= 1.5 is not new, Dunst 1.2.0 required it too
but there was no active check for it.
* Installation process
The internals of dunst's make installation process have slightly changed. The
install routine won't install the service files for DBus and systemd in a hardcoded
subdirectory of $PREFIX. It'll now query the `dbus-1` and `systemd` pkg-config
packages for those paths and will put it there.
To overwrite the pkg-config values, you can manually specify another path.
Use `SERVICEDIR_(DBUS|SYSTEMD)` vars as parameters to your make calls.
For all introduced variables, see [the README.md].
* Portability
GNU-specific functions have been disabled to make dunst portable to nongnu libc's.
For a full list of changes see [CHANGELOG.md].
===================================================================================
Release Notes For v1.2.0
===================================================================================
After about 3 years of inactivity, dunst is back under active development.
Version 1.2 is supposed to be fully backwards compatible with 1.1 but due to
the number of changes and the time since the last release there may be some
overlooked breakages. If one is found it should be reported to the bug tracker.
For users:
* Markup
The `allow_markup` setting has been deprecated in favour of `markup` which
is a multi-value setting that can be used to control much more accurately
how markup in notifications should be handled. Currently it only supports
`no`, `strip` and `full` as values but it is planned to be expanded soon.
To preserve backwards compatibility, `allow_markup` is still supported but
users are encouraged to update their configuration files since it will be
removed after a few major releases.
* DPI handling
The DPI value used is now retrieved from the `Xft.dpi` X resource if
available. If not, the default value 96 will be used.
Additionally, as an experiment a per-monitor dpi setting, which tries to
calculate an acceptable dpi values for each monitor, has been added to the
experimental section of the configuration file.
* RandR and Xinerama
Dunst switched from using the Xinerama extension to provide multi-monitor
support to using the more modern RandR extension. While this change won't
affect the majority of users, some legacy drivers do not support RandR. In
that case, the `force_xinerama` option was added as a way to fall back to
the old method.
The downside of forcing Xinerama to be used is that dunst won't be able to
detect when a monitor is added or removed meaning that follow mode might
break if the screen layout changes.
* Frame settings
All the settings in the frame section of the configuration file have been
deprecated and have been moved into the global section. The `color` and `size`
settings became `frame_color` and `frame_size` respectively. As with
`allow_markup`, the old format still works but it'll be removed in one of the
next major releases.
* Deprecation of urgency-specific command line flags
The urgency specific command line flags (`-li, -ni, -ci, -lf, -nf, -cf, -lb,
-nb, -cb, -lfr, -nfr, -cfr, -lto, -nto, -cto`) have been deprecated with no
plan for a replacement. If you rely on them please respond to issue #328 on
the bug tracker with your use case.
For maintainers:
* The project homepage has been changed to https://dunst-project.org
* The main repository has been changed to https://github.com/dunst-project/dunst
* Dependency changes:
- Dependency on libraries that were unused in the code but were mentioned as
dependencies has been dropped. Dunst no longer depends on: libfreetype,
libxft and libxext.
- Added dependency on libxradnr and libgtk2.0.
For a full list of changes see CHANGELOG.md.
===================================================================================
Release Notes For v1.0.0
===================================================================================
PACKAGE MAINTAINERS:
There are new dependencies introduced with this version:
*glib
*pango/cairo
* The drawing backend was moved from Xlib to Cairo/Pango.
This change requires some user intervention since Pango
uses different font strings. For example "Monospace-12"
becomes "Monospace 12". Font sizes might also get interpreted
differently.
* Markup
Markup within the notification can be interpreted by pango.
Examples are italic and bold. If the Markup
can't be parsed by pango, the tags are stripped from the
notification and the text is displayed as plain text. An error
message gets printed to stdout describing why the markup could
not be parsed.
To make use of markup the option allow_markup must be set in dunstrc.
If this option is not set, dunst falls back to the old behaviour
(stripping all tags from the text and display plain text).
* Actions are now supported.
If a client adds an action to a notification this gets indicated
by an (A) infront of the notification. In this case the
context menu shortcut can be used to invoke this action.
* Indicator for URLs.
If dunst detects an URL within the notification this gets indicated
by an (U) infront of the notification. As with actions the URL can
be opened with the context menu shortcut. (This requires the browser
option to be set in the dunstrc).
* dunstify ( a drop-in replacement for notify-send)
Since notify-send lacks some features I need to for testing, I've
written dunstify. It supports the same option as notify-send + The
abillity to print the id of the notification to stdout and to replace
or close existing notifications.
example:
id=$(dunstify -p "Replace" "this should get replaced after the sleep")
sleep 5
dunstify -r $id "replacement"
see dunstify --help for additional info.
Since dunstify depends on non-public parts of libnotify it may break
on every other libnotify version than that version that I use.
Because of this it does not get build and installed by default.
It can be build with "make dunstify". An installation target does
not exist.
Please don't open bug reports when dunstify doesn't work with your
version of libnotify
===================================================================================
Release Notes For v0.4.0
===================================================================================
Since dunst has lost its ability to show notifications independend of
dbus/libnotify a long time ago I think it is time that the describtion reflects
that. Even though this breaks the acronym. So if you're a packager please update
the package description to read something like:
short:
"Dunst - a dmenu-ish notification-daemon"
long:
"Dunst is a highly configurable and lightweight notification-daemon"
Release Tarballs are now available at:
http://www.knopwob.org/public/dunst-release/
For more information have a look at the CHANGELOG and the new options in dunstrc.
dunst-1.12.2/completions/ 0000775 0000000 0000000 00000000000 14762024016 0015270 5 ustar 00root root 0000000 0000000 dunst-1.12.2/completions/_dunst.zshcomp 0000664 0000000 0000000 00000001751 14762024016 0020175 0 ustar 00root root 0000000 0000000 #compdef _dunst dunst
# ZSH arguments completion script for the dunst command
local curcontext="$curcontext" ret=1
local -a state line subs
_arguments -C \
'1:opt:->opts' \
'2:param:->params' \
&& ret=0
case $state in
(opts)
_arguments \
{-v,--version,-version}"[Print version]" \
'(-verbosity)-verbosity[Minimum level for message]' \
{-conf,--config}"[Path to configuration file]:file:_files" \
{-print,--print}"[Print notifications to stdout]" \
{-startup_notification,--startup_notification}"[Display a notification on startup]" \
{-h,-help,--help}"[Print help]"
;;
(params)
case $line[1] in
-verbosity)
local -a verbosity_params;
verbosity_params=(
"crit"
"warn"
"mesg"
"info"
"debug"
)
_describe verbosity_params verbosity_params && ret=0
;;
-conf|--config)
_arguments '*:file:_files' && ret=0
;;
esac
esac
dunst-1.12.2/completions/_dunstctl.zshcomp 0000664 0000000 0000000 00000005025 14762024016 0020676 0 ustar 00root root 0000000 0000000 #compdef _dunstctl dunstctl
# ZSH arguments completion script for the dunstctl command
# Depends on: gAWK (rule), jq (history-pop)
local curcontext="$curcontext" ret=1
local -a state line subs
_arguments -C \
'1:cmd:->cmds' \
'2:opt:->opts' \
'3:third:->thirds' \
&& ret=0
case $state in
(cmds)
local -a commands
commands=(
'action:Perform the default action, or open the context menu of the notification at the given position'
'close:Close the last notification or optionally the notification with given ID'
'close-all:Close all the notifications'
'context:Open context menu'
'count:Show the number of notifications'
'history:Display notification history (in JSON)'
'history-clear:Delete all notifications from history'
'history-pop:Pop the latest notification from history or optionally the notification with given ID'
'history-rm:Remove the notification with given ID from history'
'is-paused:Check if pause level is greater than 0'
'set-paused:Set the pause status'
'get-pause-level:Get the current pause level'
'set-pause-level:Set the pause level'
'rule:Enable or disable a rule by its name'
'rules:Displays configured rules'
'reload:Reload the settings of the running instance, optionally with specific configuration files'
'debug:Print debugging information'
'help:Show help'
)
_describe commands commands && ret=0
;;
(opts)
case $line[1] in
count)
local -a count_opts;
count_opts=(
"displayed"
"history"
"waiting"
)
_describe count_opts count_opts && ret=0
;;
set-paused)
local -a setpaused_opts;
setpaused_opts=(
"true"
"false"
"toggle"
)
_describe setpaused_opts setpaused_opts && ret=0
;;
rule)
local -a rules;
rules=(
`dunstctl rules --json | jq -r '.data[][].name.data'`
)
_describe rules_opts rules && ret=0
;;
history-pop)
local -a history_ids;
history_ids=(
`dunstctl history | jq -M '.data[0][].id.data'`
)
_describe history_ids history_ids && ret=0
;;
esac
;;
(thirds)
case $line[1] in
rule)
local -a rulestates_opts;
rulestates_opts=(
"enable"
"disable"
"toggle"
)
_describe rulestates_opts rulestates_opts && ret=0
;;
esac
esac
return ret
dunst-1.12.2/completions/dunst.bashcomp 0000664 0000000 0000000 00000001072 14762024016 0020143 0 ustar 00root root 0000000 0000000 _dunst() {
local opts cur prev split=false
_get_comp_words_by_ref cur prev
COMPREPLY=()
opts='-v -version --version -verbosity -conf -config -print --print -startup_notification --startup_notification -h -help --help'
case "$prev" in
-verbosity) COMPREPLY=( $( compgen -W 'crit warn mesg info debug' -- "$cur") )
return ;;
-conf|--config) _filedir
return ;;
esac
case "$cur" in
*) COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) ) ;;
esac
} && complete -F _dunst dunst
# ex: filetype=sh
dunst-1.12.2/completions/dunst.fishcomp 0000664 0000000 0000000 00000000740 14762024016 0020160 0 ustar 00root root 0000000 0000000 complete -c dunst -s v -l version -o version -d 'Print version'
complete -c dunst -o verbosity -x -a 'crit warn mesg info debug' -d 'Minimum level for message'
complete -c dunst -o conf -o config -d 'Path to configuration file'
complete -c dunst -o print -l print -d 'Print notifications to stdout'
complete -c dunst -o startup_notification -l startup_notification -d 'Display a notification on startup'
complete -c dunst -s h -l help -o help -d 'Print help'
# ex: filetype=fish
dunst-1.12.2/completions/dunstctl.bashcomp 0000664 0000000 0000000 00000002245 14762024016 0020651 0 ustar 00root root 0000000 0000000 _dunstctl() {
local opts cur prev
_get_comp_words_by_ref cur prev
COMPREPLY=()
opts='action close close-all context count debug help history history-clear history-pop history-rm is-paused rule rules set-paused get-pause-level set-pause-level reload'
case "$prev" in
count) COMPREPLY=( $( compgen -W 'displayed history waiting' -- "$cur" ) )
return ;;
set-paused) COMPREPLY=( $( compgen -W 'true false toggle' -- "$cur" ) )
return ;;
history-pop|history-rm)
COMPREPLY=( $( compgen -W "$(dunstctl history | jq -r '.data[][].id.data')" -- "$cur" ) )
return ;;
rule)
COMPREPLY=( $( compgen -W "$(dunstctl rules --json | jq -r '.data[][].name.data')" -- "$cur" ) )
return ;;
rules)
COMPREPLY=( $( compgen -W "--json" -- "$cur" ) )
return ;;
esac
case "${COMP_WORDS[1]}" in
rule) COMPREPLY=( $( compgen -W 'enable disable toggle' -- "$cur" ) )
return ;;
esac
case "$cur" in
*) COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) ) ;;
esac
} && complete -F _dunstctl dunstctl
# ex: filetype=sh
dunst-1.12.2/completions/dunstctl.fishcomp 0000664 0000000 0000000 00000006275 14762024016 0020674 0 ustar 00root root 0000000 0000000 function __fish_dunstctl_info
dunstctl (string split ' ' $argv[1]) | jq -r ".data[][] | \"\(.$argv[2].data)\t\(.$argv[3].data)\""
end
function __fish_dunstctl_rule_complete
set -l parts (string split ' ' $argv[1])
if test (count $parts[-1]) -eq 0 || test $parts[-2] = rule
__fish_dunstctl_info 'rules --json' name enabled
return
end
# TODO? enable disable might not make sense when the rule is already in the correct state
echo -e 'enable\ndisable\ntoggle'
end
# commands
complete -c dunstctl -f -n __fish_use_subcommand -a action -d 'Perform the default action, or open the context menu of the notification at the given position'
complete -c dunstctl -f -n __fish_use_subcommand -a close -d 'Close the last notification or optionally the notification with given ID'
complete -c dunstctl -f -n __fish_use_subcommand -a close-all -d 'Close all the notifications'
complete -c dunstctl -f -n __fish_use_subcommand -a context -d 'Open context menu'
complete -c dunstctl -f -n __fish_use_subcommand -a count -d 'Show the number of notifications'
complete -c dunstctl -f -n __fish_use_subcommand -a history -d 'Display notification history (in JSON)'
complete -c dunstctl -f -n __fish_use_subcommand -a history-clear -d 'Delete all notifications from history'
complete -c dunstctl -f -n __fish_use_subcommand -a history-pop -d 'Pop the latest notification from history or optionally the notification with given ID'
complete -c dunstctl -f -n __fish_use_subcommand -a history-rm -d 'Remove the notification from history with given ID'
complete -c dunstctl -f -n __fish_use_subcommand -a is-paused -d 'Check if pause level is greater than 0'
complete -c dunstctl -f -n __fish_use_subcommand -a set-paused -d 'Set the pause status'
complete -c dunstctl -f -n __fish_use_subcommand -a get-pause-level -d 'Get the current pause level'
complete -c dunstctl -f -n __fish_use_subcommand -a set-pause-level -d 'Set the pause level'
complete -c dunstctl -f -n __fish_use_subcommand -a rules -d 'Displays configured rules (optionally in JSON)'
complete -c dunstctl -f -n __fish_use_subcommand -a rule -d 'Enable or disable a rule by its name'
complete -c dunstctl -f -n __fish_use_subcommand -a reload -d 'Reload the settings of the running instance, optionally with specific configuration files'
complete -c dunstctl -f -n __fish_use_subcommand -a debug -d 'Print debugging information'
complete -c dunstctl -f -n __fish_use_subcommand -a help -d 'Show help'
# command specific arguments
complete -c dunstctl -x -n '__fish_seen_subcommand_from action close close-all context history history-clear is-paused get-pause-level set-pause-level debug help'
complete -c dunstctl -x -n '__fish_seen_subcommand_from count' -a 'displayed history waiting'
complete -c dunstctl -x -n '__fish_seen_subcommand_from history-pop history-rm' -a '(__fish_dunstctl_info history id appname)'
complete -c dunstctl -x -n '__fish_seen_subcommand_from set-paused' -a 'true false toggle'
complete -c dunstctl -x -n '__fish_seen_subcommand_from rule' -a '(__fish_dunstctl_rule_complete (commandline -c))'
complete -c dunstctl -x -n '__fish_seen_subcommand_from rules' -a --json
complete -c dunstctl -n '__fish_seen_subcommand_from reload'
# ex: filetype=fish
dunst-1.12.2/completions/dunstify.fishcomp 0000664 0000000 0000000 00000003113 14762024016 0020665 0 ustar 00root root 0000000 0000000 if command -q jq
function __fish_dunstify_history
dunstctl history | jq -r '.data[][] | "\(.id.data)\t\(.appname.data)"'
end
else
function __fish_dunstify_history
dunstctl history | awk '/"id" :/ {getline; getline; print $3}'
end
end
complete -c dunstify -s '?' -l help -d 'Show help options'
complete -c dunstify -s a -l appname -r -d 'Name of your application'
complete -c dunstify -s u -l urgency -x -a 'low normal critical' -d 'The urgency of this notification'
complete -c dunstify -s h -l hints -x -d 'User specified hints'
complete -c dunstify -s A -l action -x -d 'Actions the user can invoke'
complete -c dunstify -s t -l timeout -x -d 'The time in milliseconds until the notification expires'
complete -c dunstify -s i -l icon -x -d 'An Icon that should be displayed with the notification'
complete -c dunstify -s I -l raw_icon -r -d 'Path to the icon to be sent as raw image data'
complete -c dunstify -s c -l category -d 'The category of this notification'
complete -c dunstify -l capabilities -d 'Print the server capabilities and exit'
complete -c dunstify -s s -l serverinfo -d 'Print server information and exit'
complete -c dunstify -s p -l printid -d 'Print id, which can be used to update/replace this notification'
complete -c dunstify -s r -l replace -x -a '(__fish_dunstify_history)' -d 'Set id of this notification.'
complete -c dunstify -s C -l close -x -a '(__fish_dunstify_history)' -d 'Close the notification with the specified ID'
complete -c dunstify -s b -l block -d 'Block until notification is closed and print close reason'
# ex: filetype=fish
dunst-1.12.2/config.mk 0000664 0000000 0000000 00000004225 14762024016 0014535 0 ustar 00root root 0000000 0000000 # paths
PREFIX ?= /usr/local
BINDIR ?= ${PREFIX}/bin
SYSCONFDIR ?= ${PREFIX}/etc/xdg
SYSCONFFILE ?= ${SYSCONFDIR}/dunst/dunstrc
DATADIR ?= ${PREFIX}/share
BASHCOMPLETIONDIR ?= ${DATADIR}/bash-completion/completions
FISHCOMPLETIONDIR ?= ${DATADIR}/fish/vendor_completions.d
ZSHCOMPLETIONDIR ?= ${DATADIR}/zsh/site-functions
# around for backwards compatibility
MANPREFIX ?= ${DATADIR}/man
MANDIR ?= ${MANPREFIX}
SERVICEDIR_DBUS ?= ${DATADIR}/dbus-1/services
SERVICEDIR_SYSTEMD ?= ${PREFIX}/lib/systemd/user
EXTRA_CFLAGS ?=
DOXYGEN ?= doxygen
FIND ?= find
GCOVR ?= gcovr
GIT ?= git
PKG_CONFIG ?= pkg-config
POD2MAN ?= pod2man
SED ?= sed
SYSTEMDAEMON ?= systemd
VALGRIND ?= valgrind
# Disable systemd service file installation,
# if you don't want to use systemd albeit installed
#SYSTEMD ?= 0
# Disable dependency on wayland. This will force dunst to use
# xwayland on wayland compositors
# You can also use "make WAYLAND=0" to build without wayland
# WAYLAND ?= 0
# Disable dependency on libnotify. this will remove the ability
# to easily send notifications using dunstify or notify-send via D-Bus.
# Do this if you have your own utility to send notifications.
# Other applications will continue to work, as they use direct D-Bus.
# DUNSTIFY ?=0
# Disable installation of completions.
# COMPLETIONS ?= 0
ifneq (0, ${WAYLAND})
ENABLE_WAYLAND= -DENABLE_WAYLAND
endif
ifneq (0, ${X11})
ENABLE_X11= -DENABLE_X11
endif
# flags
DEFAULT_CPPFLAGS = -Wno-gnu-zero-variadic-macro-arguments -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\" -DSYSCONFDIR=\"${SYSCONFDIR}\" ${ENABLE_WAYLAND} ${ENABLE_X11}
DEFAULT_CFLAGS = -g -std=gnu11 -pedantic -Wall -Wno-overlength-strings -Os ${EXTRA_CFLAGS}
DEFAULT_LDFLAGS = -lm -lrt
CPPFLAGS_DEBUG := -DDEBUG_BUILD
CFLAGS_DEBUG := -O0
LDFLAGS_DEBUG :=
pkg_config_packs := gio-2.0 \
gdk-pixbuf-2.0 \
"glib-2.0 >= 2.44" \
pangocairo \
ifneq (0,${WAYLAND})
pkg_config_packs += wayland-client
pkg_config_packs += wayland-cursor
endif
ifneq (0,${X11})
pkg_config_packs += x11
pkg_config_packs += xinerama
pkg_config_packs += xext
pkg_config_packs += "xrandr >= 1.5"
pkg_config_packs += xscrnsaver
endif
dunst-1.12.2/contrib/ 0000775 0000000 0000000 00000000000 14762024016 0014374 5 ustar 00root root 0000000 0000000 dunst-1.12.2/contrib/dunst_espeak.sh 0000775 0000000 0000000 00000000104 14762024016 0017413 0 ustar 00root root 0000000 0000000 #!/bin/bash
summary="$2"
body="$3"
echo "$summary $body" | espeak
dunst-1.12.2/contrib/dunst_xr_theme_changer.sh 0000775 0000000 0000000 00000020455 14762024016 0021460 0 ustar 00root root 0000000 0000000 #!/usr/bin/env bash
###############################################################################
##
## Usage
##
## ./ []
##
## If it does not run, give execute permissions to the script with
## chmod +x . Then run ./.
##
## Options
##
## -h|--help Optional. Show help message.
##
## Description
##
## This script creates a dunst themed user config in $HOME/.config/dunst/
## folder, changing dunst basic theming options (like fonts, colors, etc.)
## according to your current X resources color palette.
##
## To make this possible, it reads your current user config
## ($HOME/.conf/dunst/dunstrc, which is copied from the default config if
## it does not exist) and changes the attributes values with new ones (see
## Theming section for more info). Then it dumps the new configuration to
## $user_xr_color_conf file.
##
## Theming
##
## To change colors and fonts:
##
## * Firstly you have to ensure that those dunst attributes are defined in
## the corresponding sections. For example, to change the frame_color
## value from the global section, in $HOME/.config/dunst/dunstrc should
## be:
##
## ...
## [global]
## ...
## frame_color =
## ...
##
## * Then, you can change attribute values as you wish with the
## following format in theme_attr_dict:
##
## ["-"]="|$(xrdb_get '' '')"
##
## Each means the following:
##
## * sec - current section name e.g.: global.
## * attr - current attribute name e.g.: frame-color.
## * val - a simple value e.g.: "#fffeee", Monospace, 11...
## * X_res - X resource name e.g.: color8.
## * dev_val - default value to set if X_res is not found e.g.: #65737e.
##
## Theming example (you can check theme_attr_dict for other values):
##
## ["global-frame_color"]="\"$(xrdb_get 'color8' '#65737e')
##
## The function xrdb_get, searches the first parameter in the X resources
## database with appres (command installed from xorg-appres in archlinux
## and x11-utils in ubuntu). If the first parameter does not exist, the
## function returns the second parameter. For hex colors, is important to
## scape " characters for proper functioning of dunst config reader (for
## example "#ffeegg").
##
## You can define X_res variables in $HOME/.Xresources file. For in depth
## syntax go to https://wiki.archlinux.org/index.php/X_resources.
##
###############################################################################
set -e
# Check if appres is installed
if [ ! "$(command -v appres)" ]; then
printf 'Install xorg-appres in archlinux and x11-utils in debian/ubuntu.\n'
exit 1
fi
readonly script_name="$(basename "$0")"
readonly base_dir="$(realpath "$(dirname "$0")")"
# Show ussage
usage() {
grep -e '^##[^#]*$' "$base_dir/$script_name" | \
sed -e "s/^##[[:space:]]\{0,1\}//g" \
-e "s//${script_name}/g"
exit 2
} 2>/dev/null
# Show help
if [ "$#" -gt 0 ]; then
if ! [[ "$1" == "--help" || "$1" == "-h" ]]; then
printf '\nUnknown option.\n'
fi
usage
fi
# Function to get resource values
xrdb_get () {
output="$(appres Dunst | grep "$1:" | head -n1 | cut -f2)"
default="$2"
printf '%s' "${output:-$default}"
}
#
# Attributes dictionary. Add or remove attributes (see header for more info)
#
declare -A theme_attr_dict=(
["global-font"]="$(xrdb_get 'font' 'Monospace') $(xrdb_get '*.font_size:' '11')"
["global-frame_width"]="$(xrdb_get 'border_width' '1')"
["global-frame_color"]="\"$(xrdb_get 'color8' '#65737e')\""
["urgency_low-background"]="\"$(xrdb_get 'color0' '#2b303b')\""
["urgency_low-foreground"]="\"$(xrdb_get 'color4' '#65737e')\""
["urgency_low-frame_color"]="\"$(xrdb_get 'color4' '#65737e')\""
["urgency_normal-background"]="\"$(xrdb_get 'color0' '#2b303b')\""
["urgency_normal-foreground"]="\"$(xrdb_get 'color2' '#a3be8c')\""
["urgency_normal-frame_color"]="\"$(xrdb_get 'color2' '#a3be8c')\""
["urgency_critical-background"]="\"$(xrdb_get 'color0' '#2b303b')\""
["urgency_critical-foreground"]="\"$(xrdb_get 'color1' '#bf616a')\""
["urgency_critical-frame_color"]="\"$(xrdb_get 'color1' '#bf616a')\""
)
# Attributes dictionary keys.
readonly valid_keys="${!theme_attr_dict[@]}"
#
# File paths
#
# User config dir and file
readonly user_conf_dir="${XDG_CONFIG_HOME:-$HOME/.config}/dunst"
readonly user_conf="$user_conf_dir/dunstrc"
# Default config dir and example file
example_conf_dir="/usr/share/dunst"
example_conf="$example_conf_dir/dunstrc"
# User xresources color config file
readonly user_xr_color_conf="$user_conf_dir/dunstrc_xr_colors"
# Check if the user config directory exists
if ! [ -d "$user_conf_dir" ]; then
printf 'Creating folder "%s".\n' "$user_conf_dir"
mkdir -p "$user_conf_dir"
fi
# Check if the user config file exists
if ! [ -f "$user_conf" ]; then
printf '"%s" file does not exist.\nChecking for config file example.' \
"$user_conf"
if [ -d "/usr/share/dunst" ]; then
# Archlinux default dir and example file
example_conf_dir="/usr/share/dunst"
if [ -f "$example_conf_dir/dunstrc" ]; then
example_conf="$example_conf_dir/dunstrc"
else
printf 'Could not find the example config file in "%s".
\nPlease, change $example_conf variable in the script.' \
"$example_conf_dir"
exit 1
fi
elif [ -d "/usr/share/doc/dunst" ]; then
# Debian/Ubuntu default dir
example_conf_dir="/usr/share/doc/dunst"
if [ -f "$example_conf_dir/dunstrc.example.gz" ]; then
# Ubuntu <= 17.10 and Debian <= 1.2.0-2 example file:
example_conf="$example_conf_dir/dunstrc.example.gz"
elif [ -f "$example_conf_dir/dunstrc.gz" ]; then
# Ubuntu >= 18.04 and Debian >= 1.3.0-2 example file:
example_conf="$example_conf_dir/dunstrc.gz"
else
printf 'Could not find the example config file in "%s".
\nPlease, change $example_conf variable in the script.' \
"$example_conf_dir"
exit 1
fi
else
printf 'Could not find the example config directory.
\nPlease, change $example_conf_dir variable in the script.'
exit 1
fi
printf 'Copying example config to "%s".\n' "$user_conf_dir"
# Get the extension to check if the file is compressed
if [[ "${example_conf##*\.}" == "gz" ]]; then
# Extract example file to user config file
gunzip -c "$example_conf" > "$user_conf"
else
cp "$example_conf" "$user_conf_dir"
fi
fi
# Regular expressions
readonly re_section_line='^\[(.*)\]$'
readonly re_empty_comment_line='(^$)|(^[[:space:]]*(\#)|(;))'
readonly re_attribute_line='^([[:space:]]*)([_[:alnum:]]+)'
# Create an array with the file lines
mapfile -t conf < "$user_conf"
# Iterate over the file lines
for idx in "${!conf[@]}"; do
# Current line
curr_line="${conf[$idx]}"
# If we are in a new section:
if [[ "$curr_line" =~ $re_section_line ]]; then
curr_section="${BASH_REMATCH[1]}"
continue
fi
# Skip the line if it is empty or has a comment
if [[ "$curr_line" =~ $re_empty_comment_line ]]; then
continue
fi
# Get the attribute in the current line
[[ "$curr_line" =~ $re_attribute_line ]]
curr_attr_name="${BASH_REMATCH[2]}"
curr_sett_name="${curr_section}-${curr_attr_name}"
# If the current attribute is not in our dictionary, continue
case "$valid_keys" in
*"$curr_sett_name"*)
printf -v conf[$idx] ' %s = %s' \
"${curr_attr_name}" \
"${theme_attr_dict[$curr_sett_name]}"
;;
esac
done
# Create a header for the xr_color config file
user_xr_color_conf_content="\
###################################
#
# Config file created with
# $script_name wrapper
#
###################################
"
# After everything is completed, write the new config to a file
user_xr_color_conf_content+="$(printf '%s\n' "${conf[@]}")"
printf '%s\n' "$user_xr_color_conf_content" > "$user_xr_color_conf"
printf '"%s" updated successfully.\n' "$user_xr_color_conf"
dunst-1.12.2/contrib/notification-history.sh 0000775 0000000 0000000 00000003650 14762024016 0021124 0 ustar 00root root 0000000 0000000 #!/bin/sh
tests() {
#check if these get displayed right
notify-send "Dinner is ready"
notify-send "The\nTrick"
notify-send "The Trick
#2"
}
history_json="$(dunstctl history)"
history_items="$(printf '%s' "$history_json" | jq -r '.data[0][] | .appname.data , (.timestamp.data | tostring) , .summary.data | gsub("[\\n]"; "\\n")')" # the gsub is to really ensure no escaped new lines in the data lead us to print new lines. New lines in data have to be escaped. (Because) Actual newlines are the field separator essential to the logic of the while loop below, and rofi further down.
#history_items ends up looking like arrays with an order with this meaning:
#appname (newline) timestamp (newline) summary (newline)
#
#NetworkManager
#223948180
#Wi-Fi Networks Available
#
#How do we know where this notification ends and another begins? By length, which is always 3 values.
#history_length="$(($(echo "$history_items" | wc -l) / 3 ))"
iter=0
IFS='
'
while read -r application_name; read -r notification_timestamp ; read -r notification_summary
do
iter=$((iter+1))
system_timestamp=$(cat /proc/uptime|cut -d'.' -f1)
how_long_ago=$((system_timestamp - notification_timestamp / 1000000))
notification_time=$(date +%X -d "$(date) - $how_long_ago seconds")
option=$(printf '"%s" (%s) - %s - %04d' "$notification_summary" "$application_name" "$notification_time" "$iter")
options="$options$option
"
done <