mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-01 22:58:44 -04:00
feat:add arg to keep tag when tagmon
This commit is contained in:
parent
20d132de3f
commit
b97222b6b0
2 changed files with 3 additions and 1 deletions
|
|
@ -692,6 +692,7 @@ FuncType parse_func_name(char *func_name, Arg *arg, char *arg_value,
|
||||||
} else if (strcmp(func_name, "tagmon") == 0) {
|
} else if (strcmp(func_name, "tagmon") == 0) {
|
||||||
func = tagmon;
|
func = tagmon;
|
||||||
(*arg).i = parse_direction(arg_value);
|
(*arg).i = parse_direction(arg_value);
|
||||||
|
(*arg).ui = atoi(arg_value2);
|
||||||
} else if (strcmp(func_name, "incgaps") == 0) {
|
} else if (strcmp(func_name, "incgaps") == 0) {
|
||||||
func = incgaps;
|
func = incgaps;
|
||||||
(*arg).i = atoi(arg_value);
|
(*arg).i = atoi(arg_value);
|
||||||
|
|
|
||||||
|
|
@ -6702,13 +6702,14 @@ void tagsilent(const Arg *arg) {
|
||||||
|
|
||||||
void tagmon(const Arg *arg) {
|
void tagmon(const Arg *arg) {
|
||||||
Client *c = focustop(selmon);
|
Client *c = focustop(selmon);
|
||||||
|
unsigned int newtags = arg->ui ? c->tags : 0;
|
||||||
Monitor *m;
|
Monitor *m;
|
||||||
if (c) {
|
if (c) {
|
||||||
if (c == selmon->sel) {
|
if (c == selmon->sel) {
|
||||||
selmon->sel = NULL;
|
selmon->sel = NULL;
|
||||||
}
|
}
|
||||||
m = dirtomon(arg->i);
|
m = dirtomon(arg->i);
|
||||||
setmon(c, m, 0, true);
|
setmon(c, m, newtags, true);
|
||||||
reset_foreign_tolevel(c);
|
reset_foreign_tolevel(c);
|
||||||
// 重新计算居中的坐标
|
// 重新计算居中的坐标
|
||||||
if (c->isfloating) {
|
if (c->isfloating) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue