added rules to config.def.h

This commit is contained in:
Sascha Kruse 2012-07-25 10:06:26 +02:00
parent 311e2ff437
commit 59886c1447
3 changed files with 16 additions and 1 deletions

View File

@ -29,3 +29,15 @@ keyboard_shortcut close_all_ks = {.str = "ctrl+shift+space",
keyboard_shortcut history_ks = {.str = "ctrl+grave",
.code = 0, .sym = NoSymbol,.is_valid = False}; /* ignore this */
rule_t default_rules[] = {
/* name can be any unique string. It is used to identify the rule in dunstrc to override it there */
/* name, appname, summary, body, icon, timeout, urgency, fg, bg, format */
{ "empty", NULL, NULL, NULL, NULL, -1, -1, NULL, NULL, NULL, },
/* { "rule1", "notify-send", NULL, NULL, NULL, -1, -1, NULL, NULL, "%s %b" }, */
/* { "rule2", "Pidgin", "*says*, NULL, NULL, -1, CRITICAL, NULL, NULL, NULL }, */
/* { "rule3", "Pidgin", "*signed on*", NULL, NULL, -1, LOW, NULL, NULL, NULL }, */
/* { "rule4", "Pidgin", "*signed off*", NULL, NULL, -1, LOW, NULL, NULL, NULL }, */
/* { "rule5", NULL, "*foobar*", NULL, NULL, -1, -1, NULL, "#00FF00", NULL, }, */
};

View File

@ -15,7 +15,7 @@ XINERAMALIBS = -lXinerama
XINERAMAFLAGS = -DXINERAMA
# uncomment to disable parsing of dunstrc
STATIC= -DSTATIC_CONFIG
#STATIC= -DSTATIC_CONFIG
# inih flags
INIFLAGS = -DINI_ALLOW_MULTILINE=0

View File

@ -1471,6 +1471,9 @@ int main(int argc, char *argv[])
now = time(&now);
rules = l_init();
for (int i = 0; i < LENGTH(default_rules); i++) {
l_push(rules, &default_rules[i]);
}
#ifndef STATIC_CONFIG
char *cmdline_config_path;
cmdline_config_path = parse_cmdline_for_config_file(argc, argv);