[rules] Rename Rule to rule_t
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
59f8e36969
commit
c9f4c45007
2
client.c
2
client.c
|
@ -350,7 +350,7 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int screen)
|
||||||
bool rettrans, retloadprops;
|
bool rettrans, retloadprops;
|
||||||
uint32_t config_win_val;
|
uint32_t config_win_val;
|
||||||
Tag *tag;
|
Tag *tag;
|
||||||
Rule *rule;
|
rule_t *rule;
|
||||||
xcb_size_hints_t *u_size_hints;
|
xcb_size_hints_t *u_size_hints;
|
||||||
|
|
||||||
c = p_new(Client, 1);
|
c = p_new(Client, 1);
|
||||||
|
|
4
config.c
4
config.c
|
@ -486,7 +486,7 @@ config_parse(const char *confpatharg)
|
||||||
cfg_t *cfg, *cfg_rules, *cfg_keys, *cfg_mouse, *cfgsectmp;
|
cfg_t *cfg, *cfg_rules, *cfg_keys, *cfg_mouse, *cfgsectmp;
|
||||||
int ret, screen, i;
|
int ret, screen, i;
|
||||||
char *confpath;
|
char *confpath;
|
||||||
Rule *rule = NULL;
|
rule_t *rule = NULL;
|
||||||
FILE *defconfig = NULL;
|
FILE *defconfig = NULL;
|
||||||
|
|
||||||
if(confpatharg)
|
if(confpatharg)
|
||||||
|
@ -533,7 +533,7 @@ config_parse(const char *confpatharg)
|
||||||
rule_list_init(&globalconf.rules);
|
rule_list_init(&globalconf.rules);
|
||||||
for(i = cfg_size(cfg_rules, "rule") - 1; i >= 0; i--)
|
for(i = cfg_size(cfg_rules, "rule") - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
rule = p_new(Rule, 1);
|
rule = p_new(rule_t, 1);
|
||||||
cfgsectmp = cfg_getnsec(cfg_rules, "rule", i);
|
cfgsectmp = cfg_getnsec(cfg_rules, "rule", i);
|
||||||
rule->prop_r = rules_compile_regex(cfg_getstr(cfgsectmp, "name"));
|
rule->prop_r = rules_compile_regex(cfg_getstr(cfgsectmp, "name"));
|
||||||
rule->tags_r = rules_compile_regex(cfg_getstr(cfgsectmp, "tags"));
|
rule->tags_r = rules_compile_regex(cfg_getstr(cfgsectmp, "tags"));
|
||||||
|
|
6
rules.c
6
rules.c
|
@ -42,7 +42,7 @@ rules_compile_regex(char *val)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
tag_match_rule(Tag *t, Rule *r)
|
tag_match_rule(Tag *t, rule_t *r)
|
||||||
{
|
{
|
||||||
regmatch_t tmp;
|
regmatch_t tmp;
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@ tag_match_rule(Tag *t, Rule *r)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Rule *
|
rule_t *
|
||||||
rule_matching_client(Client *c)
|
rule_matching_client(Client *c)
|
||||||
{
|
{
|
||||||
Rule *r;
|
rule_t *r;
|
||||||
char *prop = NULL, buf[512];
|
char *prop = NULL, buf[512];
|
||||||
regmatch_t tmp;
|
regmatch_t tmp;
|
||||||
ssize_t len;
|
ssize_t len;
|
||||||
|
|
6
rules.h
6
rules.h
|
@ -27,10 +27,10 @@
|
||||||
#define RULE_NOSCREEN -1
|
#define RULE_NOSCREEN -1
|
||||||
|
|
||||||
regex_t * rules_compile_regex(char *);
|
regex_t * rules_compile_regex(char *);
|
||||||
bool tag_match_rule(Tag *, Rule *);
|
bool tag_match_rule(Tag *, rule_t *);
|
||||||
Rule * rule_matching_client(Client *);
|
rule_t * rule_matching_client(Client *);
|
||||||
|
|
||||||
DO_SLIST(Rule, rule, p_delete)
|
DO_SLIST(rule_t, rule, p_delete)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
|
@ -63,8 +63,8 @@ typedef struct
|
||||||
} titlebar_t;
|
} titlebar_t;
|
||||||
|
|
||||||
/** Rule type */
|
/** Rule type */
|
||||||
typedef struct Rule Rule;
|
typedef struct rule_t rule_t;
|
||||||
struct Rule
|
struct rule_t
|
||||||
{
|
{
|
||||||
char *icon;
|
char *icon;
|
||||||
char *xprop;
|
char *xprop;
|
||||||
|
@ -77,7 +77,7 @@ struct Rule
|
||||||
regex_t *tags_r;
|
regex_t *tags_r;
|
||||||
regex_t *xpropval_r;
|
regex_t *xpropval_r;
|
||||||
/** Next and previous rules */
|
/** Next and previous rules */
|
||||||
Rule *prev, *next;
|
rule_t *prev, *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Key bindings */
|
/** Key bindings */
|
||||||
|
@ -347,7 +347,7 @@ struct AwesomeConf
|
||||||
/** Screens info */
|
/** Screens info */
|
||||||
ScreensInfo *screens_info;
|
ScreensInfo *screens_info;
|
||||||
/** Rules list */
|
/** Rules list */
|
||||||
Rule *rules;
|
rule_t *rules;
|
||||||
/** Keys bindings list */
|
/** Keys bindings list */
|
||||||
Key *keys;
|
Key *keys;
|
||||||
/** Mouse bindings list */
|
/** Mouse bindings list */
|
||||||
|
|
2
tag.c
2
tag.c
|
@ -174,7 +174,7 @@ tag_client_with_current_selected(Client *c)
|
||||||
* \param r the rule
|
* \param r the rule
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
tag_client_with_rule(Client *c, Rule *r)
|
tag_client_with_rule(Client *c, rule_t *r)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
Tag *tag;
|
||||||
bool matched = false;
|
bool matched = false;
|
||||||
|
|
2
tag.h
2
tag.h
|
@ -35,7 +35,7 @@ Tag ** tags_get_current(int);
|
||||||
void tag_client(Client *, Tag *);
|
void tag_client(Client *, Tag *);
|
||||||
void untag_client(Client *, Tag *);
|
void untag_client(Client *, Tag *);
|
||||||
bool is_client_tagged(Client *, Tag *);
|
bool is_client_tagged(Client *, Tag *);
|
||||||
void tag_client_with_rule(Client *, Rule *r);
|
void tag_client_with_rule(Client *, rule_t *r);
|
||||||
void tag_client_with_current_selected(Client *);
|
void tag_client_with_current_selected(Client *);
|
||||||
void tag_view_only_byindex(int, int);
|
void tag_view_only_byindex(int, int);
|
||||||
void tag_append_to_screen(Tag *, int);
|
void tag_append_to_screen(Tag *, int);
|
||||||
|
|
|
@ -34,7 +34,7 @@ focusicon_draw(Widget *widget, DrawCtx *ctx, int offset,
|
||||||
int used __attribute__ ((unused)))
|
int used __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
area_t area;
|
area_t area;
|
||||||
Rule* r;
|
rule_t *r;
|
||||||
Client *sel = focus_get_current_client(widget->statusbar->screen);
|
Client *sel = focus_get_current_client(widget->statusbar->screen);
|
||||||
NetWMIcon *icon;
|
NetWMIcon *icon;
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ tasklist_draw(Widget *widget, DrawCtx *ctx, int offset, int used)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
Data *d = widget->data;
|
Data *d = widget->data;
|
||||||
Rule *r;
|
rule_t *r;
|
||||||
area_t area;
|
area_t area;
|
||||||
style_t style;
|
style_t style;
|
||||||
int n = 0, i = 0, box_width = 0, icon_width = 0, box_width_rest = 0;
|
int n = 0, i = 0, box_width = 0, icon_width = 0, box_width_rest = 0;
|
||||||
|
|
Loading…
Reference in New Issue