rebase titleurgent patch to main

This commit is contained in:
Ben Collerson 2024-06-07 08:45:16 +10:00
parent 766e439ae8
commit 1812d4926a

View File

@ -1,4 +1,4 @@
From 1a083c558cb49bb89ccb152301c4a004f9fa227c Mon Sep 17 00:00:00 2001 From ab002204c8bb7c8c36828aeb89ef3cf9b0447ea6 Mon Sep 17 00:00:00 2001
From: Ben Collerson <benc@benc.cc> From: Ben Collerson <benc@benc.cc>
Date: Fri, 29 Dec 2023 19:02:11 +1000 Date: Fri, 29 Dec 2023 19:02:11 +1000
Subject: [PATCH] titleurgent Subject: [PATCH] titleurgent
@ -9,31 +9,30 @@ Subject: [PATCH] titleurgent
2 files changed, 13 insertions(+), 3 deletions(-) 2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/config.def.h b/config.def.h diff --git a/config.def.h b/config.def.h
index a8ed61d9..f1deca87 100644 index a784eb4f..a5000901 100644
--- a/config.def.h --- a/config.def.h
+++ b/config.def.h +++ b/config.def.h
@@ -21,11 +21,13 @@ static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; /* You can al @@ -21,10 +21,12 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca
static int log_level = WLR_ERROR; static int log_level = WLR_ERROR;
static const Rule rules[] = { static const Rule rules[] = {
- /* app_id title tags mask isfloating monitor */ - /* app_id title tags mask isfloating monitor */
+ /* app_id title tags mask isfloating titleurgent monitor */ + /* app_id title tags mask isfloating titleurgent monitor */
/* examples: /* examples: */
- { "Gimp", NULL, 0, 1, -1 }, - { "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
+ { "Gimp", NULL, 0, 1, 0, -1 }, - { "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
*/ + { "Gimp_EXAMPLE", NULL, 0, 1, 0, -1 }, /* Start on currently visible tags floating, not tiled */
- { "firefox", NULL, 1 << 8, 0, -1 }, + { "firefox_EXAMPLE", NULL, 1 << 8, 0, 0, -1 }, /* Start on ONLY tag "9" */
+ { "firefox", NULL, 1 << 8, 0, 0, -1 }, + { "org.qutebrowser.qutebrowser_EXAMPLE",
+ { "org.qutebrowser.qutebrowser",
+ NULL, 0, 0, 1, -1 }, + NULL, 0, 0, 1, -1 },
}; };
/* layout(s) */ /* layout(s) */
diff --git a/dwl.c b/dwl.c diff --git a/dwl.c b/dwl.c
index 4d19357f..6dc5d710 100644 index 6f041a0d..9486c435 100644
--- a/dwl.c --- a/dwl.c
+++ b/dwl.c +++ b/dwl.c
@@ -133,6 +133,7 @@ typedef struct { @@ -138,6 +138,7 @@ typedef struct {
unsigned int bw; unsigned int bw;
uint32_t tags; uint32_t tags;
int isfloating, isurgent, isfullscreen; int isfloating, isurgent, isfullscreen;
@ -41,7 +40,7 @@ index 4d19357f..6dc5d710 100644
uint32_t resize; /* configure serial of a pending resize */ uint32_t resize; /* configure serial of a pending resize */
} Client; } Client;
@@ -217,6 +218,7 @@ typedef struct { @@ -228,6 +229,7 @@ typedef struct {
const char *title; const char *title;
uint32_t tags; uint32_t tags;
int isfloating; int isfloating;
@ -49,7 +48,7 @@ index 4d19357f..6dc5d710 100644
int monitor; int monitor;
} Rule; } Rule;
@@ -431,6 +433,7 @@ applyrules(Client *c) @@ -455,6 +457,7 @@ applyrules(Client *c)
Monitor *mon = selmon, *m; Monitor *mon = selmon, *m;
c->isfloating = client_is_float_type(c); c->isfloating = client_is_float_type(c);
@ -57,7 +56,7 @@ index 4d19357f..6dc5d710 100644
if (!(appid = client_get_appid(c))) if (!(appid = client_get_appid(c)))
appid = broken; appid = broken;
if (!(title = client_get_title(c))) if (!(title = client_get_title(c)))
@@ -440,6 +443,7 @@ applyrules(Client *c) @@ -464,6 +467,7 @@ applyrules(Client *c)
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; c->isfloating = r->isfloating;
@ -65,7 +64,7 @@ index 4d19357f..6dc5d710 100644
newtags |= r->tags; newtags |= r->tags;
i = 0; i = 0;
wl_list_for_each(m, &mons, link) { wl_list_for_each(m, &mons, link) {
@@ -2683,6 +2687,10 @@ updatetitle(struct wl_listener *listener, void *data) @@ -2821,6 +2825,10 @@ updatetitle(struct wl_listener *listener, void *data)
Client *c = wl_container_of(listener, c, set_title); Client *c = wl_container_of(listener, c, set_title);
if (c == focustop(c->mon)) if (c == focustop(c->mon))
printstatus(); printstatus();
@ -77,5 +76,5 @@ index 4d19357f..6dc5d710 100644
void void
-- --
2.43.0 2.45.1