allow and add default client rule

This commit is contained in:
sewn 2024-06-30 22:37:13 +03:00
parent d34be5d545
commit 8a414f7cae
No known key found for this signature in database
2 changed files with 8 additions and 5 deletions

View File

@ -20,12 +20,14 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca
/* logging */
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[] = {
/* app_id title tags mask isfloating monitor */
/* examples: */
{ "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
{ "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
/* examples of rule on current tag, floating; and rule starting only on tag "9"
{ "Gimp", NULL, 0, 1, -1 },
{ "firefox", NULL, 1 << 8, 0, -1 },
*/
/* default client rule */
{ NULL, NULL, 0, -1, -1 },
};
/* layout(s) */

3
dwl.c
View File

@ -465,7 +465,8 @@ applyrules(Client *c)
for (r = rules; r < END(rules); r++) {
if ((!r->title || strstr(title, r->title))
&& (!r->id || strstr(appid, r->id))) {
c->isfloating = r->isfloating;
if (r->isfloating < -1)
c->isfloating = r->isfloating;
newtags |= r->tags;
i = 0;
wl_list_for_each(m, &mons, link) {