mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-26 17:54:14 +00:00
allow and add default client rule
This commit is contained in:
parent
d34be5d545
commit
8a414f7cae
10
config.def.h
10
config.def.h
@ -20,12 +20,14 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca
|
|||||||
/* logging */
|
/* logging */
|
||||||
static int log_level = WLR_ERROR;
|
static int log_level = WLR_ERROR;
|
||||||
|
|
||||||
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */
|
|
||||||
static const Rule rules[] = {
|
static const Rule rules[] = {
|
||||||
/* app_id title tags mask isfloating monitor */
|
/* app_id title tags mask isfloating monitor */
|
||||||
/* examples: */
|
/* examples of rule on current tag, floating; and rule starting only on tag "9"
|
||||||
{ "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
|
{ "Gimp", NULL, 0, 1, -1 },
|
||||||
{ "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
|
{ "firefox", NULL, 1 << 8, 0, -1 },
|
||||||
|
*/
|
||||||
|
/* default client rule */
|
||||||
|
{ NULL, NULL, 0, -1, -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* layout(s) */
|
/* layout(s) */
|
||||||
|
|||||||
3
dwl.c
3
dwl.c
@ -465,7 +465,8 @@ applyrules(Client *c)
|
|||||||
for (r = rules; r < END(rules); r++) {
|
for (r = rules; r < END(rules); r++) {
|
||||||
if ((!r->title || strstr(title, r->title))
|
if ((!r->title || strstr(title, r->title))
|
||||||
&& (!r->id || strstr(appid, r->id))) {
|
&& (!r->id || strstr(appid, r->id))) {
|
||||||
c->isfloating = r->isfloating;
|
if (r->isfloating < -1)
|
||||||
|
c->isfloating = r->isfloating;
|
||||||
newtags |= r->tags;
|
newtags |= r->tags;
|
||||||
i = 0;
|
i = 0;
|
||||||
wl_list_for_each(m, &mons, link) {
|
wl_list_for_each(m, &mons, link) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user