Adding the toggletopbar patch ref. #363
This commit is contained in:
@@ -30,6 +30,7 @@ case $# in
|
||||
transferall) ;&
|
||||
togglealttag) ;&
|
||||
togglebar) ;&
|
||||
toggletopbar) ;&
|
||||
togglefloating) ;&
|
||||
togglefullscreen) ;&
|
||||
fullscreen) ;&
|
||||
|
@@ -310,6 +310,9 @@
|
||||
#if TOGGLEFULLSCREEN_PATCH
|
||||
#include "togglefullscreen.c"
|
||||
#endif
|
||||
#if TOGGLETOPBAR_PATCH
|
||||
#include "toggletopbar.c"
|
||||
#endif
|
||||
#if TRANSFER_PATCH
|
||||
#include "transfer.c"
|
||||
#endif
|
||||
|
@@ -312,6 +312,9 @@
|
||||
#if TOGGLEFULLSCREEN_PATCH
|
||||
#include "togglefullscreen.h"
|
||||
#endif
|
||||
#if TOGGLETOPBAR_PATCH
|
||||
#include "toggletopbar.h"
|
||||
#endif
|
||||
#if TRANSFER_PATCH
|
||||
#include "transfer.h"
|
||||
#endif
|
||||
|
20
patch/toggletopbar.c
Normal file
20
patch/toggletopbar.c
Normal file
@@ -0,0 +1,20 @@
|
||||
void
|
||||
toggletopbar(const Arg *arg)
|
||||
{
|
||||
Bar *bar;
|
||||
Monitor *m = selmon;
|
||||
|
||||
for (bar = m->bar; bar; bar = bar->next)
|
||||
bar->topbar = !bar->topbar;
|
||||
|
||||
if (!m->showbar) {
|
||||
togglebar(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
updatebarpos(m);
|
||||
|
||||
for (bar = m->bar; bar; bar = bar->next)
|
||||
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
||||
arrange(m);
|
||||
}
|
1
patch/toggletopbar.h
Normal file
1
patch/toggletopbar.h
Normal file
@@ -0,0 +1 @@
|
||||
static void toggletopbar(const Arg *arg);
|
Reference in New Issue
Block a user