dylanaraps / pywal

🎨 Generate and change color-schemes on the fly.
MIT License
8.44k stars 330 forks source link

Adding colors-wal-dwm.h to config.def.h in dwm to update colors with pywal on recompile #641

Open harsh13virdi opened 3 years ago

harsh13virdi commented 3 years ago

i was going through the procedure of removing the lines in config.def.h in dwm sourcecode that defines colors and the entire color array. and i added the line #include "/home/USER/.cache/wal/colors-wal-dwm.h" to get colors that pywal generates for dwm. but on recompile i noticed that there is a line for dmenu in config.def.h that uses the color variables that we just removed. i just workaround it by using the variables in colors-wal-dwm.h in place of the now removed color variables and it worked perfectly fine. maybe this can be mentioned in the steps for customizing dwm?

Here is how i set it up

/* commands */

static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */

static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", norm_bg, "-nf", norm_fg, "-sb", sel_bg, "-sf", sel_fg, NULL };

static const char *termcmd[] = { "st", NULL };

ghost commented 1 year ago

if you follow the pywal instructions for dmenu, then change the static const char *dmenucmd[] ....... to static const char *dmenucmd[] = { "dmenu_run", NULL}. it just works. but in my case, the colorscheme doesn't change dynamically. i have to recompile it

harsh13virdi commented 1 year ago

if you follow the pywal instructions for dmenu, then change the static const char *dmenucmd[] ....... to static const char *dmenucmd[] = { "dmenu_run", NULL}. it just works. but in my case, the colorscheme doesn't change dynamically. i have to recompile it

I don't think any of the suckless utility would dynamically change colors , you have to recompile it unless you are using Xresources patch for dwm st dmenu so on and so forth.