Skip to content

Global hook to modify notification body ? #1494

@Magniquick

Description

@Magniquick

So I have notification theme like this:

Image

and it would be nice to be able to edit the icon to represent which app is sending the notification, also to process some notifications from web browsers to make it easier to read

#1072 does mention something similar :

I run this version and I use it to change some fields like this:

#!/bin/bash

if [[ "${DUNST_BODY}" == *mattermost.xxx.yy* ]]; then
       	DUNST_BODY="$(echo "${DUNST_BODY}" | sed -e 's|<a[^@]*||g' -e 's|\(@[^:]*:\)|<b>\1</b>|g' | xargs)"
fi

but it was never merged.

The best way I can think of now it to have a script catch all the notifications, set their format to none, and rethrow those notifications, which sounds extremely hacky.

I would love to know if there is a better method for doing this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions