udiboy1209 / dotfiles

Config files for wm and terminal apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

missing color macro definition in dwm config.h

jabacz-dev opened this issue · comments

commented

Hello Sir,

I found your custom dwm patch on reddit and tried to build the very nice powerline*ish status bar for dwm. But build fails with multiple errors because themecolor (as defined in config.h) is not recognised by compiler.
Steps done:

  • applied your custom patch to dwm successfully
  • created the colors.h from your template by using python quik
  • created config.h from your dwm-config.h.
  • run make

#define color themecolor

I manage to build dwm just fine by explicitly defining *colors[][3] and *statuscolor[][3], but I am too curious how your solutionis working for easier color templating.

May I kindly ask if you would explain where themecolor is coming from and what it does?

build error output

config.h:15:15: error: ‘themecolor’ undeclared here (not in a function); did you mean ‘color’?
 #define color themecolor
               ^
config.h:18:23: note: in expansion of macro ‘color’
  [SchemeNorm]     = { color[Gray3], color[Gray1]    , color[Gray4] },
                       ^~~~~
config.h:15:15: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
 #define color themecolor
               ^
config.h:24:4: note: in expansion of macro ‘color’
  { color[Gray3], color[Gray2]     , color[Gray2]  }, /* dark */
    ^~~~~
config.h:15:15: note: (near initialization for ‘statuscolors[0][0]’)
 #define color themecolor
               ^
config.h:24:4: note: in expansion of macro ‘color’
  { color[Gray3], color[Gray2]     , color[Gray2]  }, /* dark */
    ^~~~~
config.h:15:15: error: initializer element is not constant
 #define color themecolor

themecolor used to be generated by this file dotfiles/wm/suckless-colors.h.template but I think there is some mismatch here which I may have fixed locally but have not commited here.

You can just delete the #define themecolor to make it work.