mirror of
https://github.com/mintycube/dotfiles.git
synced 2024-10-22 14:05:41 +02:00
37 lines
805 B
C
37 lines
805 B
C
void
|
|
holdbar(const Arg *arg)
|
|
{
|
|
if (selmon->showbar)
|
|
return;
|
|
Bar *bar;
|
|
selmon->showbar = 2;
|
|
updatebarpos(selmon);
|
|
for (bar = selmon->bar; bar; bar = bar->next)
|
|
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
|
drawbar(selmon);
|
|
}
|
|
|
|
void
|
|
keyrelease(XEvent *e)
|
|
{
|
|
Bar *bar;
|
|
if (XEventsQueued(dpy, QueuedAfterReading)) {
|
|
XEvent ne;
|
|
XPeekEvent(dpy, &ne);
|
|
|
|
if (ne.type == KeyPress && ne.xkey.time == e->xkey.time &&
|
|
ne.xkey.keycode == e->xkey.keycode) {
|
|
XNextEvent(dpy, &ne);
|
|
return;
|
|
}
|
|
}
|
|
if (e->xkey.keycode == XKeysymToKeycode(dpy, HOLDKEY) && selmon->showbar == 2) {
|
|
selmon->showbar = 0;
|
|
updatebarpos(selmon);
|
|
for (bar = selmon->bar; bar; bar = bar->next)
|
|
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
|
arrange(selmon);
|
|
}
|
|
}
|
|
|