feat: add tagrule option no_hide

This commit is contained in:
DreamMaoMao 2025-09-25 11:09:52 +08:00
parent 12a2492270
commit cabc1bf8b6
3 changed files with 11 additions and 1 deletions

View file

@ -131,6 +131,7 @@ typedef struct {
char *layout_name; // 布局名称
char *monitor_name;
int no_render_border;
int no_hide;
} ConfigTagRule;
typedef struct {
@ -1327,6 +1328,8 @@ void parse_config_line(Config *config, const char *line) {
rule->monitor_name = strdup(val);
} else if (strcmp(key, "no_render_border") == 0) {
rule->no_render_border = CLAMP_INT(atoi(val), 0, 1);
} else if (strcmp(key, "no_hide") == 0) {
rule->no_hide = CLAMP_INT(atoi(val), 0, 1);
}
}
token = strtok(NULL, ",");
@ -2738,6 +2741,8 @@ void reapply_tagrule(void) {
config.tag_rules[i - 1].layout_name) == 0) {
m->pertag->ltidxs[config.tag_rules[i - 1].id] =
&layouts[jk];
m->pertag->no_hide[config.tag_rules[i - 1].id] =
config.tag_rules[i - 1].no_hide;
}
}
}