diff --git a/src/config/parse_config.h b/src/config/parse_config.h index e817f48..66a73eb 100644 --- a/src/config/parse_config.h +++ b/src/config/parse_config.h @@ -692,6 +692,7 @@ FuncType parse_func_name(char *func_name, Arg *arg, char *arg_value, } else if (strcmp(func_name, "tagmon") == 0) { func = tagmon; (*arg).i = parse_direction(arg_value); + (*arg).ui = atoi(arg_value2); } else if (strcmp(func_name, "incgaps") == 0) { func = incgaps; (*arg).i = atoi(arg_value); diff --git a/src/maomao.c b/src/maomao.c index b719aaa..54122e7 100644 --- a/src/maomao.c +++ b/src/maomao.c @@ -6702,13 +6702,14 @@ void tagsilent(const Arg *arg) { void tagmon(const Arg *arg) { Client *c = focustop(selmon); + unsigned int newtags = arg->ui ? c->tags : 0; Monitor *m; if (c) { if (c == selmon->sel) { selmon->sel = NULL; } m = dirtomon(arg->i); - setmon(c, m, 0, true); + setmon(c, m, newtags, true); reset_foreign_tolevel(c); // 重新计算居中的坐标 if (c->isfloating) {