old config restore

This commit is contained in:
2023-09-20 21:19:07 +02:00
parent faedc5a5ea
commit 4df8f384b8
28 changed files with 334 additions and 299 deletions

View File

@@ -9,7 +9,7 @@ layoutmenu(const Arg *arg) {
s = fgets(c, sizeof(c), p);
pclose(p);
if (!s || *s == '\0' || c[0] == '\0')
if (!s || *s == '\0' || c == '\0')
return;
i = atoi(c);

View File

@@ -22,8 +22,8 @@ combotag(const Arg *arg)
combo = 1;
selmon->sel->tags = arg->ui & TAGMASK;
}
arrange(selmon);
focus(NULL);
arrange(selmon);
}
}

View File

@@ -22,10 +22,10 @@ distributetags(const Arg *arg)
#if TAGSYNC_PATCH
}
selmon = origselmon;
focus(NULL);
arrange(NULL);
focus(NULL);
#else
arrange(selmon);
focus(NULL);
arrange(selmon);
#endif // TAGSYNC_PATCH
}

View File

@@ -30,7 +30,6 @@ case $# in
transferall) ;&
togglealttag) ;&
togglebar) ;&
toggletopbar) ;&
togglefloating) ;&
togglefullscreen) ;&
fullscreen) ;&

View File

@@ -6,8 +6,8 @@ tagtoleft(const Arg *arg)
&& __builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
&& selmon->tagset[selmon->seltags] > 1) {
selmon->sel->tags >>= 1;
arrange(selmon);
focus(NULL);
arrange(selmon);
}
}
@@ -19,8 +19,8 @@ tagtoright(const Arg *arg)
&& __builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
&& selmon->tagset[selmon->seltags] & (MASK >> 1)) {
selmon->sel->tags <<= 1;
arrange(selmon);
focus(NULL);
arrange(selmon);
}
}

View File

@@ -1,9 +0,0 @@
Client *
getpointerclient(void)
{
Window dummy, win;
int di;
unsigned int dui;
XQueryPointer(dpy, root, &dummy, &win, &di, &di, &di, &di, &dui);
return wintoclient(win);
}

View File

@@ -1 +0,0 @@
static Client *getpointerclient(void);

View File

@@ -151,9 +151,6 @@
#if FOCUSDIR_PATCH
#include "focusdir.c"
#endif
#if FOCUSFOLLOWMOUSE_PATCH
#include "focusfollowmouse.c"
#endif
#if FOCUSMASTER_PATCH
#include "focusmaster.c"
#endif
@@ -313,9 +310,6 @@
#if TOGGLEFULLSCREEN_PATCH
#include "togglefullscreen.c"
#endif
#if TOGGLETOPBAR_PATCH
#include "toggletopbar.c"
#endif
#if TRANSFER_PATCH
#include "transfer.c"
#endif

View File

@@ -154,9 +154,6 @@
#if FOCUSADJACENTTAG_PATCH
#include "focusadjacenttag.h"
#endif
#if FOCUSFOLLOWMOUSE_PATCH
#include "focusfollowmouse.h"
#endif
#if FOCUSMASTER_PATCH
#include "focusmaster.h"
#endif
@@ -315,9 +312,6 @@
#if TOGGLEFULLSCREEN_PATCH
#include "togglefullscreen.h"
#endif
#if TOGGLETOPBAR_PATCH
#include "toggletopbar.h"
#endif
#if TRANSFER_PATCH
#include "transfer.h"
#endif

View File

@@ -21,7 +21,7 @@ struct Pertag {
#endif // ZOOMSWAP_PATCH
#if PERTAG_VANITYGAPS_PATCH && VANITYGAPS_PATCH
int enablegaps[NUMTAGS + 1];
int gaps[NUMTAGS + 1];
unsigned int gaps[NUMTAGS + 1];
#endif // PERTAG_VANITYGAPS_PATCH | VANITYGAPS_PATCH
};

View File

@@ -62,8 +62,8 @@ togglescratch(const Arg *arg)
if (found) {
if (newtagset) {
selmon->tagset[selmon->seltags] = newtagset;
arrange(selmon);
focus(NULL);
arrange(selmon);
}
if (ISVISIBLE(found)) {
focus(found);

View File

@@ -6,8 +6,8 @@ scratchpad_hide()
if (selmon->sel) {
selmon->sel->tags = SCRATCHPAD_MASK;
selmon->sel->isfloating = 1;
arrange(selmon);
focus(NULL);
arrange(selmon);
}
}
@@ -36,8 +36,8 @@ scratchpad_show()
if (scratchpad_last_showed->tags != SCRATCHPAD_MASK) {
scratchpad_last_showed->tags = SCRATCHPAD_MASK;
arrange(selmon);
focus(NULL);
arrange(selmon);
return;
}

View File

@@ -15,15 +15,13 @@ setborderpx(const Arg *arg)
int delta = 2 * (m->borderpx - prev_borderpx);
#if BAR_BORDER_PATCH
if (!barborderpx) {
for (bar = m->bar; bar; bar = bar->next) {
bar->bh = bar->bh - 2 * bar->borderpx + 2 * m->borderpx;
bar->borderpx = m->borderpx;
}
updatebarpos(m);
for (bar = m->bar; bar; bar = bar->next)
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
for (bar = m->bar; bar; bar = bar->next) {
bar->bh = bar->bh - 2 * bar->borderpx + 2 * m->borderpx;
bar->borderpx = m->borderpx;
}
updatebarpos(m);
for (bar = m->bar; bar; bar = bar->next)
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
#endif // BAR_BORDER_PATCH
for (c = m->clients; c; c = c->next) {

View File

@@ -91,8 +91,8 @@ unswallow(Client *c)
setfloatinghint(c);
#endif // BAR_EWMHTAGS_PATCH
setclientstate(c, NormalState);
arrange(c->mon);
focus(NULL);
arrange(c->mon);
}
pid_t

View File

@@ -43,7 +43,7 @@ tagallmon(const Arg *arg)
}
}
arrange(NULL);
focus(NULL);
arrange(NULL);
}

View File

@@ -37,8 +37,8 @@ tagothermon(const Arg *arg, int dir)
sendmon(sel, newmon);
if (arg->ui & TAGMASK) {
sel->tags = arg->ui & TAGMASK;
arrange(newmon);
focus(NULL);
arrange(newmon);
}
}

View File

@@ -69,7 +69,7 @@ tagswapmon(const Arg *arg)
}
}
arrange(NULL);
focus(NULL);
arrange(NULL);
}

View File

@@ -1,20 +0,0 @@
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);
}

View File

@@ -1 +0,0 @@
static void toggletopbar(const Arg *arg);

View File

@@ -132,6 +132,7 @@ xrdb(const Arg *arg)
#endif // BAR_ALPHA_PATCH
ColCount
);
arrange(NULL);
focus(NULL);
arrange(NULL);
}