switchtotag: add missing commas

This commit is contained in:
Guido Cella
2026-11-05 11:42:00 +01:00
parent 28f91b0326
commit 427130f2f5
2 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ Add a rule option to switch to the configured tag when a window opens, then swit
### Download
- [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
- [Guido Cella](https://codeberg.org/guidocella)
+8 -8
View File
@@ -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>
Date: Sun, 4 Oct 2026 10:22:14 +0200
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(-)
diff --git a/config.def.h b/config.def.h
index a4019d3..ffb0d6a 100644
index 4901e7a..9b0d333 100644
--- a/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 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 */
- { "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
+ /* app_id title tags mask switchtotag isfloating monitor */
+ { "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" */
+ { "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" */
/* default/example rule: can be changed but cannot be eliminated; at least one rule must exist */
};
diff --git a/dwl.c b/dwl.c
index 7d8fc1e..8201d29 100644
index 6ce12a4..b28f71d 100644
--- a/dwl.c
+++ b/dwl.c
@@ -162,6 +162,7 @@ typedef struct {
@@ -47,7 +47,7 @@ index 7d8fc1e..8201d29 100644
int isfloating;
int monitor;
} Rule;
@@ -594,6 +596,11 @@ applyrules(Client *c)
@@ -598,6 +600,11 @@ applyrules(Client *c)
if (r->monitor == i++)
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->resize_serial = 0;
c->current = (struct wlr_box){0};