mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
removed tagmonsilent (haven't figured out how to do this right yet)
This commit is contained in:
parent
cd83239be4
commit
def7376912
2 changed files with 11 additions and 30 deletions
|
|
@ -22,7 +22,6 @@ int32_t togglefullscreen(const Arg *arg);
|
||||||
int32_t togglemaximizescreen(const Arg *arg);
|
int32_t togglemaximizescreen(const Arg *arg);
|
||||||
int32_t togglegaps(const Arg *arg);
|
int32_t togglegaps(const Arg *arg);
|
||||||
int32_t tagmon(const Arg *arg);
|
int32_t tagmon(const Arg *arg);
|
||||||
int32_t tagmonsilent(const Arg *arg);
|
|
||||||
int32_t spawn(const Arg *arg);
|
int32_t spawn(const Arg *arg);
|
||||||
int32_t spawn_shell(const Arg *arg);
|
int32_t spawn_shell(const Arg *arg);
|
||||||
int32_t spawn_on_empty(const Arg *arg);
|
int32_t spawn_on_empty(const Arg *arg);
|
||||||
|
|
|
||||||
|
|
@ -1099,7 +1099,7 @@ int32_t tag(const Arg *arg) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tagmon_general(const Arg *arg, bool silent) {
|
int32_t tagmon(const Arg *arg) {
|
||||||
Monitor *m = NULL, *cm = NULL;
|
Monitor *m = NULL, *cm = NULL;
|
||||||
if (!selmon)
|
if (!selmon)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -1131,9 +1131,7 @@ int32_t tagmon_general(const Arg *arg, bool silent) {
|
||||||
uint32_t target;
|
uint32_t target;
|
||||||
|
|
||||||
if (c->mon == m) {
|
if (c->mon == m) {
|
||||||
if (!silent) {
|
view(&(Arg){.ui = newtags}, true);
|
||||||
view(&(Arg){.ui = newtags}, true);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1141,15 +1139,11 @@ int32_t tagmon_general(const Arg *arg, bool silent) {
|
||||||
selmon->sel = NULL;
|
selmon->sel = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
setmon(c, m, newtags, !silent);
|
setmon(c, m, newtags, true);
|
||||||
client_update_oldmonname_record(c, m);
|
client_update_oldmonname_record(c, m);
|
||||||
|
|
||||||
reset_foreign_tolevel(c);
|
reset_foreign_tolevel(c);
|
||||||
|
|
||||||
if (silent) {
|
|
||||||
focusclient(focustop(selmon), 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
c->float_geom.width =
|
c->float_geom.width =
|
||||||
(int32_t)(c->float_geom.width * c->mon->w.width / selmon->w.width);
|
(int32_t)(c->float_geom.width * c->mon->w.width / selmon->w.width);
|
||||||
c->float_geom.height =
|
c->float_geom.height =
|
||||||
|
|
@ -1161,35 +1155,23 @@ int32_t tagmon_general(const Arg *arg, bool silent) {
|
||||||
// 重新计算居中的坐标
|
// 重新计算居中的坐标
|
||||||
if (c->isfloating) {
|
if (c->isfloating) {
|
||||||
c->geom = c->float_geom;
|
c->geom = c->float_geom;
|
||||||
if (!silent) {
|
target = get_tags_first_tag(c->tags);
|
||||||
target = get_tags_first_tag(c->tags);
|
view(&(Arg){.ui = target}, true);
|
||||||
view(&(Arg){.ui = target}, true);
|
focusclient(c, 1);
|
||||||
focusclient(c, 1);
|
|
||||||
}
|
|
||||||
resize(c, c->geom, 1);
|
resize(c, c->geom, 1);
|
||||||
} else {
|
} else {
|
||||||
if (!silent) {
|
selmon = c->mon;
|
||||||
target = get_tags_first_tag(c->tags);
|
target = get_tags_first_tag(c->tags);
|
||||||
view(&(Arg){.ui = target}, true);
|
view(&(Arg){.ui = target}, true);
|
||||||
focusclient(c, 1);
|
focusclient(c, 1);
|
||||||
}
|
|
||||||
arrange(selmon, false, false);
|
arrange(selmon, false, false);
|
||||||
}
|
}
|
||||||
if (config.warpcursor && !silent) {
|
if (config.warpcursor) {
|
||||||
warp_cursor_to_selmon(c->mon);
|
warp_cursor_to_selmon(c->mon);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tagmon(const Arg *arg) {
|
|
||||||
return tagmon_general(arg, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t tagmonsilent(const Arg *arg) {
|
|
||||||
return tagmon_general(arg, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t tagsilent(const Arg *arg) {
|
int32_t tagsilent(const Arg *arg) {
|
||||||
Client *fc = NULL;
|
Client *fc = NULL;
|
||||||
Client *target_client = NULL;
|
Client *target_client = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue