Make number of tags configurable (tag_count)#739
Make number of tags configurable (tag_count)#739gplusplus314 wants to merge 12 commits intomangowm:mainfrom
Conversation
|
I'm so impatient. 😅 Binary files 1/.git/index and 2/.git/index differ
diff -u -ruw 1/src/config/parse_config.h 2/src/config/parse_config.h
--- 1/src/config/parse_config.h 2026-03-06 17:38:04.940543509 +0100
+++ 2/src/config/parse_config.h 2026-03-06 17:38:17.577672294 +0100
@@ -1578,6 +1578,7 @@
config->default_nmaster = atoi(value);
} else if (strcmp(key, "tag_count") == 0) {
config->tag_count = CLAMP_INT(atoi(value), 1, 32);
+ tag_count = config->tag_count;
} else if (strcmp(key, "center_master_overspread") == 0) {
config->center_master_overspread = atoi(value);
} else if (strcmp(key, "center_when_single_stack") == 0) {
Only in 1/src/config: parse_config.h.orig
Only in 1/src/dispatch: bind_define.h.orig
diff -u -ruw 1/src/ext-protocol/ext-workspace.h 2/src/ext-protocol/ext-workspace.h
--- 1/src/ext-protocol/ext-workspace.h 2026-03-06 17:38:04.941927965 +0100
+++ 2/src/ext-protocol/ext-workspace.h 2026-03-06 17:38:17.580583016 +0100
@@ -106,7 +106,7 @@
}
static void add_workspace_by_tag(int32_t tag, Monitor *m) {
- char name_buf[4];
+ char name_buf[12];
const char *name = get_name_from_tag(tag, name_buf, sizeof(name_buf));
struct workspace *workspace = ecalloc(1, sizeof(*workspace));
|
673ec40 to
db30977
Compare
|
Hey @hboetes , did you restart the compositor after setting the This has been stable for me, so I'm going to mark this PR as ready for review. |
|
Thanks for incorporating the fix in the first hunk of my patch! One small note on |
|
I didn't get that warning from either GCC or Clang, but I was generally unhappy with the |
|
I took another pass at making the primitives for representing a tag more consistent to avoid future UB. I also began simplifying the |
cca89fc to
393b075
Compare
|
At the first restart I changed from 10 to 5, correct reply. And at this restart I changed the number of tags to -1, and nothing spectacular happened. Also good. |
|
PLEASE ADD THIS FEATURE |
|
As I mentioned in another pr, instead of expanding the number of tags, it is better to use a more flexible dynamic tagging system. However, this workload is extremely huge, and I still have other more important work to do |
|
I completely understand the desire for a proper dynamic tagging system, that would be the right long-term solution. Since that work is still on the horizon though, would it make sense to merge this as an interim measure? It can always be refactored once the dynamic system lands, and in the meantime it unblocks current users. Thanks for your consideration. |
|
Hi @DreamMaoMao , I've updated this PR to be compatible with the latest If you're absolutely against this PR and will only ever accept a change with a more flexible dynamic tagging system, then it would be helpful to share what you had in mind in the form of a design document or discussion. Then we can see who'd be willing to work on it, how long it'll take, testing effort, etc. Until then, this PR exists right now and I'm happy to make any changes you'd like. |
…able_tag_count
This PR introduces the
tag_countconfiguration variable. When the variable is missing from the config, it defaults to 9, which is the previously hardcoded value. This is implemented such that Mango must be restarted for this configuration variable to take effect. It was done this way because the size and scope of the PR would increase dramatically if it was supported by a hot configuration reload.It works out of the box with Dank Material Shell - the IPC still works and DMS even shows and switches between the correct number of tags.