mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2026-11-05 12:43:18 +00:00
switchtotag: add missing commas
This commit is contained in:
@@ -3,7 +3,7 @@ Add a rule option to switch to the configured tag when a window opens, then swit
|
|||||||
|
|
||||||
### Download
|
### Download
|
||||||
- [git branch](https://codeberg.org/guidocella/dwl/src/branch/switchtotag)
|
- [git branch](https://codeberg.org/guidocella/dwl/src/branch/switchtotag)
|
||||||
- [2026-10-20](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/switchtotag/switchtotag.patch)
|
- [2026-11-05](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/switchtotag/switchtotag.patch)
|
||||||
|
|
||||||
### Authors
|
### Authors
|
||||||
- [Guido Cella](https://codeberg.org/guidocella)
|
- [Guido Cella](https://codeberg.org/guidocella)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
From b636e766b42a75404ada4a5c39fd66221bb19b0b Mon Sep 17 00:00:00 2001
|
From 57edceadf1022d3481935cf0b2132021e23477ae Mon Sep 17 00:00:00 2001
|
||||||
From: Guido Cella <guido@guidocella.xyz>
|
From: Guido Cella <guido@guidocella.xyz>
|
||||||
Date: Sun, 4 Oct 2026 10:22:14 +0200
|
Date: Sun, 4 Oct 2026 10:22:14 +0200
|
||||||
Subject: [PATCH] allow switching to the configured tag when a window opens
|
Subject: [PATCH] allow switching to the configured tag when a window opens
|
||||||
@@ -11,10 +11,10 @@ then switch back when it closes.
|
|||||||
2 files changed, 16 insertions(+), 3 deletions(-)
|
2 files changed, 16 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/config.def.h b/config.def.h
|
diff --git a/config.def.h b/config.def.h
|
||||||
index a4019d3..ffb0d6a 100644
|
index 4901e7a..9b0d333 100644
|
||||||
--- a/config.def.h
|
--- a/config.def.h
|
||||||
+++ b/config.def.h
|
+++ b/config.def.h
|
||||||
@@ -22,9 +22,9 @@ static const float fullscreen_bg[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* You ca
|
@@ -21,9 +21,9 @@ static const float fullscreen_bg[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* You ca
|
||||||
static int log_level = WLR_ERROR;
|
static int log_level = WLR_ERROR;
|
||||||
|
|
||||||
static const Rule rules[] = {
|
static const Rule rules[] = {
|
||||||
@@ -22,13 +22,13 @@ index a4019d3..ffb0d6a 100644
|
|||||||
- { "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
|
- { "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" */
|
- { "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
|
||||||
+ /* app_id title tags mask switchtotag isfloating monitor */
|
+ /* app_id title tags mask switchtotag isfloating monitor */
|
||||||
+ { "Gimp_EXAMPLE", NULL, 0, 0 1, -1 }, /* Start on currently visible tags floating, not tiled */
|
+ { "Gimp_EXAMPLE", NULL, 0, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
|
||||||
+ { "firefox_EXAMPLE", NULL, 1 << 8, 1 0, -1 }, /* Start on ONLY tag "9" */
|
+ { "firefox_EXAMPLE", NULL, 1 << 8, 1, 0, -1 }, /* Start on ONLY tag "9" */
|
||||||
/* default/example rule: can be changed but cannot be eliminated; at least one rule must exist */
|
/* default/example rule: can be changed but cannot be eliminated; at least one rule must exist */
|
||||||
};
|
};
|
||||||
|
|
||||||
diff --git a/dwl.c b/dwl.c
|
diff --git a/dwl.c b/dwl.c
|
||||||
index 7d8fc1e..8201d29 100644
|
index 6ce12a4..b28f71d 100644
|
||||||
--- a/dwl.c
|
--- a/dwl.c
|
||||||
+++ b/dwl.c
|
+++ b/dwl.c
|
||||||
@@ -162,6 +162,7 @@ typedef struct {
|
@@ -162,6 +162,7 @@ typedef struct {
|
||||||
@@ -47,7 +47,7 @@ index 7d8fc1e..8201d29 100644
|
|||||||
int isfloating;
|
int isfloating;
|
||||||
int monitor;
|
int monitor;
|
||||||
} Rule;
|
} Rule;
|
||||||
@@ -594,6 +596,11 @@ applyrules(Client *c)
|
@@ -598,6 +600,11 @@ applyrules(Client *c)
|
||||||
if (r->monitor == i++)
|
if (r->monitor == i++)
|
||||||
mon = m;
|
mon = m;
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,7 @@ index 7d8fc1e..8201d29 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3227,6 +3234,12 @@ unmapnotify(struct wl_listener *listener, void *data)
|
@@ -3278,6 +3285,12 @@ unmapnotify(struct wl_listener *listener, void *data)
|
||||||
c->snapshot = NULL;
|
c->snapshot = NULL;
|
||||||
c->resize_serial = 0;
|
c->resize_serial = 0;
|
||||||
c->current = (struct wlr_box){0};
|
c->current = (struct wlr_box){0};
|
||||||
|
|||||||
Reference in New Issue
Block a user