mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-05 13:29:54 -05:00
feat: add centerwin dispatch
This commit is contained in:
parent
ed1654712a
commit
e7c1c76c3d
3 changed files with 17 additions and 0 deletions
|
|
@ -601,6 +601,20 @@ void smartresizewin(const Arg *arg) {
|
|||
resize(c, c->oldgeom, 1);
|
||||
}
|
||||
|
||||
void centerwin(const Arg *arg) {
|
||||
Client *c;
|
||||
c = selmon->sel;
|
||||
|
||||
if (!c || c->isfullscreen)
|
||||
return;
|
||||
if (!c->isfloating)
|
||||
setfloating(c, true);
|
||||
|
||||
c->oldgeom = setclient_coordinate_center(c, c->geom, 0, 0);
|
||||
|
||||
resize(c, c->oldgeom, 1);
|
||||
}
|
||||
|
||||
void spawn(const Arg *arg) {
|
||||
|
||||
if (!arg->v)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue