bakkeby / dwm-flexipatch

A dwm build with preprocessor directives to decide which patches to include during build time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cant build after enabling (#define VANITYGAPS_PATCH)

hexisXz opened this issue · comments

commented

After days of trying to figure out how to enable gaps I realized I am stupid and it was #define VANITYGAPS_PATCH. so I set that to 1 and ran sudo make install. then I got these errors

cc -c -std=c99 -pedantic -Wall -Wno-unused-function -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION="6.4" -DXINERAMA drw.c
cc -c -std=c99 -pedantic -Wall -Wno-unused-function -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION="6.4" -DXINERAMA dwm.c
In file included from patch/include.c:329,
from dwm.c:850:
patch/vanitygaps.c: In function ‘togglegaps’:
patch/vanitygaps.c:87:9: error: ‘enablegaps’ undeclared (first use in this function)
87 | enablegaps = !enablegaps;
| ^~~~~~~~~~
patch/vanitygaps.c:87:9: note: each undeclared identifier is reported only once for each function it appears in
In file included from patch/include.c:329,
from dwm.c:850:
patch/vanitygaps.c: In function ‘getgaps’:
patch/vanitygaps.c:197:19: error: ‘enablegaps’ undeclared (first use in this function)
197 | oe = ie = enablegaps;
| ^~~~~~~~~~
dwm.c: In function ‘updatebarpos’:
dwm.c:4628:13: error: ‘enablegaps’ undeclared (first use in this function)
4628 | if (enablegaps)
| ^~~~~~~~~~
In file included from patch/include.c:111,
from dwm.c:850:
patch/autostart.c: In function ‘runautostart’:
patch/autostart.c:63:17: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
63 | system(path);
| ^~~~~~~~~~~~
patch/autostart.c:72:17: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
72 | system(strcat(path, " &"));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from dwm.c:848:
At top level:
config.h:893:20: warning: ‘browser’ defined but not used [-Wunused-variable]
893 | static const char* browser[] = {"Brave", NULL};
| ^~~~~~~
make: *** [Makefile:18: dwm.o] Error 1

I see, it looks like this is caused by enabling PERTAG_VANITYGAPS_PATCH only and not PERTAG_PATCH.

/* The pertag patch adds nmaster, mfacts and layouts per tag rather than per
 * monitor (default).
 * https://dwm.suckless.org/patches/pertag/
 */
#define PERTAG_PATCH 0

/* Option to enable gaps on a per tag basis rather than globally.
 * Depends on both pertag and vanitygaps patches being enabled.
 */
#define PERTAG_VANITYGAPS_PATCH 1

Try either enabling PERTAG_PATCH as well or disable PERTAG_VANITYGAPS_PATCH.

commented

I see, it looks like this is caused by enabling PERTAG_VANITYGAPS_PATCH only and not PERTAG_PATCH.

/* The pertag patch adds nmaster, mfacts and layouts per tag rather than per
 * monitor (default).
 * https://dwm.suckless.org/patches/pertag/
 */
#define PERTAG_PATCH 0

/* Option to enable gaps on a per tag basis rather than globally.
 * Depends on both pertag and vanitygaps patches being enabled.
 */
#define PERTAG_VANITYGAPS_PATCH 1

Try either enabling PERTAG_PATCH as well or disable PERTAG_VANITYGAPS_PATCH.

Okay, that fixed it. but why is the x different from the y is there a way to change that?

commented

I see, it looks like this is caused by enabling PERTAG_VANITYGAPS_PATCH only and not PERTAG_PATCH.

/* The pertag patch adds nmaster, mfacts and layouts per tag rather than per
 * monitor (default).
 * https://dwm.suckless.org/patches/pertag/
 */
#define PERTAG_PATCH 0

/* Option to enable gaps on a per tag basis rather than globally.
 * Depends on both pertag and vanitygaps patches being enabled.
 */
#define PERTAG_VANITYGAPS_PATCH 1

Try either enabling PERTAG_PATCH as well or disable PERTAG_VANITYGAPS_PATCH.

nvm i got it. thankyou!