Adding fullscreen, holdbar and unfloatvisible patches

This commit is contained in:
bakkeby
2019-10-02 00:03:21 +02:00
parent 1cff033127
commit 37b1b54ab9
12 changed files with 137 additions and 5 deletions

31
patch/holdbar.c Normal file
View File

@@ -0,0 +1,31 @@
void
holdbar(const Arg *arg)
{
selmon->showbar = 1;
updateholdbarpos(selmon);
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
}
void
keyrelease(XEvent *e)
{
if (e->xkey.keycode == XKeysymToKeycode(dpy, HOLDKEY)) {
selmon->showbar = 0;
updateholdbarpos(selmon);
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
arrange(selmon);
}
}
void
updateholdbarpos(Monitor *m)
{
m->wy = m->my;
m->wh = m->mh;
if (m->showbar) {
m->by = m->topbar ? m->wy : m->wy + m->wh - bh;
m->wy = m->topbar ? m->wy - bh + bh : m->wy;
} else {
m->by = -bh;
}
}