10 Commits

Author SHA1 Message Date
Yuri D'Elia
b5e00c43c7 Fix markup handling.
The current "allow_markup" setting will simply strip any markup from the final
notification, which includes formatting elements. On top of that, literal
[<>&..] symbols are not quoted before are being passed onto pango in several
places, resulting in stray error messages.

This patch fixes allow_markup to correctly strip markup only from the incoming
notification, not from the format.

You might also want to treat incoming messages as literal text (supplied by
un-aware programs), in which case you need to properly quote the text before
it's processed by pango. A new setting is introduced, called "plain_text",
which forces incoming messages to be treated literally.

allow_markup/plain_text are complimentary to each other.

The new rule actions allow to narrow down the handling to a specific block,
achieving notification Zen.

The following is done in this patch:

- Fix ruleset initialization in config.def.h.
- Introduce new allow_markup/plain_text actions in the rules.
- Fix handling of allow_markup to strip markup from summary/body only,
  preserving format's markup.
- Fix broken string functions (string_replace_all didn't handle recursive
  replacements correctly).
- Fix quoting of other literal fields (icon name/appname).
- Fix handling of ignore_newline as well (applied only on summary/body).
- Dunstrc update with the same previous defaults.
2014-12-05 16:05:41 +01:00
Sascha Kruse
1ccb6185ac allow rule matching against category
fix issue #135
2014-03-08 15:03:38 +01:00
Sascha Kruse
6957ac77a0 Merge branch 'feature-icon' of git://github.com/Gjum/dunst into pull_requests
Conflicts:
	dunstrc
	settings.c
2014-03-08 11:57:09 +01:00
Yuri D'Elia
431c65fc76 Add 'msg_urgency' as a new filter to match on the urgency.
This patch adds a new filter 'msg_urgency' which _matches_ on the urgency on
the notification.

This allows to configure different notification parameters/scripts to different
urgency levels.
2014-03-06 17:22:08 +01:00
Gjum
5a5dab2ff3 Add script option to override shown icon 2014-03-01 14:53:30 +01:00
Sascha Kruse
cff9c74e0e License header and vim modeline 2013-02-22 06:09:13 +00:00
Sascha Kruse
e82da9d5e7 indent -linx --no-tabs 2013-02-21 23:23:54 +00:00
Sascha Kruse
b8004f56d8 remove folding markers again 2013-02-21 23:19:30 +00:00
Sascha Kruse
4e92d61804 notification.{c,h} 2013-02-21 18:02:20 +00:00
Sascha Kruse
a587fea56f moved rules related stuff to rules.{c,h} 2013-02-21 01:37:57 +00:00