File: rules.h

package info (click to toggle)
dunst 1.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 484 kB
  • ctags: 519
  • sloc: ansic: 3,699; sh: 170; makefile: 76
file content (34 lines) | stat: -rw-r--r-- 763 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
#pragma once

#include <glib.h>

#include "dunst.h"
#include "notification.h"

typedef struct _rule_t {
        char *name;
        /* filters */
        char *appname;
        char *summary;
        char *body;
        char *icon;
        char *category;
        int msg_urgency;

        /* actions */
        int timeout;
        int urgency;
        char *new_icon;
        char *fg;
        char *bg;
        const char *format;
        const char *script;
} rule_t;

extern GSList *rules;

void rule_init(rule_t * r);
void rule_apply(rule_t * r, notification * n);
void rule_apply_all(notification * n);
bool rule_matches_notification(rule_t * r, notification * n);