bakkeby / dmenu-flexipatch

A dmenu build with preprocessor directives to decide which patches to include during build time
MIT License
183 stars 78 forks source link

dynamic options gives error #8

Closed fov95 closed 2 years ago

fov95 commented 2 years ago

When having these patches applied, I have no problems

#define ALPHA_PATCH 1
#define BORDER_PATCH 1
#define CENTER_PATCH 1
#define CTRL_V_TO_PASTE_PATCH 1
#define FUZZYMATCH_PATCH 1
#define GRID_PATCH 1
#define GRIDNAV_PATCH 1
#define LINE_HEIGHT_PATCH 1
#define MOUSE_SUPPORT_PATCH 1
#define MULTI_SELECTION_PATCH 1
#define PREFIXCOMPLETION_PATCH 1
#define PRESELECT_PATCH 1
#define SYMBOLS_PATCH 1
#define TSV_PATCH 1
#define WMTYPE_PATCH 1
#define XRESOURCES_PATCH 1
#define XYW_PATCH 1

When I add to these DYNAMIC_OPTIONS_PATCH I get

rm -f dmenu stest drw.o dmenu.o stest.o util.o dmenu-5.0.tar.gz
dmenu build options:
CFLAGS   = -std=c99 -pedantic -Wall -Os -I/usr/X11R6/include -I/usr/include/freetype2   -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION="5.0" -DXINERAMA 
LDFLAGS  = -L/usr/X11R6/lib -lX11 -lXinerama -lfontconfig -lXft  -lm -lXrender 
CC       = cc
cc -c -std=c99 -pedantic -Wall -Os -I/usr/X11R6/include -I/usr/include/freetype2   -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"5.0\" -DXINERAMA  dmenu.c
In file included from patch/include.c:5,
                 from dmenu.c:211:
patch/dynamicoptions.c: In function ‘readstream’:
patch/dynamicoptions.c:36:25: error: ‘struct item’ has no member named ‘out’
   36 |                 items[i].out = 0;
      |                         ^
make: *** [Makefile:18: dmenu.o] Error 1

Not only happens on my old build I just testet with a fresh one and same problem.

bakkeby commented 2 years ago

Thanks for the report, looks like a compatibility issue been the dynamic options patch and one of the others. I'll have a look.

bakkeby commented 2 years ago

OK, so the above change addresses the compilation error.

That said I found further conflicts between the dynamic options patch and these patches:

bakkeby commented 2 years ago

OK, I think that's it for this combo.

fov95 commented 2 years ago

Noice, thanks a lot .. too bad it wasn't what I was looking for.. I thought it would execute everything I throw at it like when giving it a list with commands, it runs each one as soon as I hover over them with selection cursor.. Is there something that would make that possible? As an example I have a redshift script that executes, well, a bunch of redshift commands but I would like to see the change before committing to it xD If one could start dmenu with selection set to none or even one if it does nothing and then run through it an have everything execute would be dope..

bakkeby commented 2 years ago

Yes the dynamic options patch is a bit weird and has limited usability (or I do not have enough gray matter to think of a good use case).

I am not entirely sure what exactly you had in mind, but from what you say it sounds like something that should be possible from a shell script using dmenu to present options.

fov95 commented 2 years ago

I''l have a look thanks. =) To be clear I meant the commands executing BEFORE u press enter in dmenu, excute them as soon as the command gains selection.