pekwm and pywal

A friend of mine asked me if it was possible to use pywal together with pekwm a while back.

pywal is a tool that generates a color scheme from the dominant colors in an image. Amongst other things, the color scheme is set in Xresources.

Me, being unaware of what pywal was at that time, looked into it and figured a good way of supporting it would be to allow for pekwm to read color information from Xresources.

Now, and in the upcoming pekwm-0.3.0 release, pekwm supports reading colors recursively from Xresources and will reload the theme if any of the referenced Xresources gets updated.

Example focused color from Xresources:

FontColor {
	Focused = "&*color1"

In addition, configuration files can also reference Xresources now using the specific variable prefix &. While at it, I also added support for reading string atoms as variables with the prefix @. These variables will be expanded when loading the configuration file and will not be dynamically updated when the resources change.

Example Xresource and atom reference:

Actions = "Exec pekwm_dialog color1 ${&*color1} theme ${@_PEKWM_THEME}"

Did a short video on using pekwm and pywal: