phillbush / xmenu

a x11 menu utility
Other
296 stars 26 forks source link

Linking xmenu to pywal? #11

Closed vaskark closed 4 years ago

vaskark commented 4 years ago

Hello. Is the any way to link xmenu to the pywal colour-changing scheme? It already does the background colour fine (color0), and I think normal text is using color7, but selected text/bg is still just white/blue.

Is this possible right now? Thanks.

phillbush commented 4 years ago

The background and foreground of xmenu follows the colors set by pywal because pywal sets the following X resources:

*background
*foreground

And xmenu uses the following X resources, which matches those set by pywal (because of the * character at the beginning of them):

xmenu.background
xmenu.foreground

These are the only xmenu colors that match pywal colors.
pywal also sets the resources *color0 to *color15, but xmenu does not use resources that matches them. Instead, xmenu uses xmenu.selbackground for the foreground of the selected item, xmenu.border for the color of the border, etc.

EDIT: See the next comment for a solution.

phillbush commented 4 years ago

The template file for X resources is colors.Xresources, Just edit it to put the following lines at the end:

xmenu.selbackground: {color4}
xmenu.selforeground: {foreground}

Then move the file to your ~/.config/wal/templates, and it should work (or I think so, I do not have pywal in my machine right now so I can not test).

You can change {color4} and {foreground} to whatever fits your needs, more information on pywal templates here.

vaskark commented 4 years ago

Thanks! Works like a charm.