bakkeby / dwm-flexipatch

A dwm build with preprocessor directives to decide which patches to include during build time
MIT License
1.18k stars 238 forks source link

`xrdb` or `xresources` #374

Closed speedie1337 closed 1 year ago

speedie1337 commented 1 year ago

I noticed that dwm-flexipatch uses the xrdb patch rather than the xresources patch. What is the reason for this?

The xresources patch seems better to me because the values can be changed by the user from the config.h header. st-flexipatch has the ResourcePref array as well.

bakkeby commented 1 year ago

dwm-flexipatch uses the xrdb patch rather than the xresources patch. What is the reason for this?

The simple answer for this is just that xrdb was integrated into dwm-flexipatch before the xresources patch was a thing. It has also not come up very often as something people have shown interest in.

Since you can put a variety of variables like showbar for example in the resources array there may also be a precedent to also have hooks for a large range of settings depending what other patches are enabled. That would be another reason why I've hold off on this.

I did this very differently in my dusk build where I define a resource prefix for each colour scheme. This is also something that I have suggested in #263.

Lucas-mother3 commented 1 year ago

dwm-flexipatch uses the xrdb patch rather than the xresources patch. What is the reason for this?

The simple answer for this is just that xrdb was integrated into dwm-flexipatch before the xresources patch was a thing. It has also not come up very often as something people have shown interest in.

Since you can put a variety of variables like showbar for example in the resources array there may also be a precedent to also have hooks for a large range of settings depending what other patches are enabled. That would be another reason why I've hold off on this.

I did this very differently in my dusk build where I define a resource prefix for each colour scheme. This is also something that I have suggested in #263.

Hmmm interesting because I was working on rebasing my own builds off dwm-flexipatch (check suckless-utils/flexipatch branch), and in the testing environment that I use (mainly Xephyr), I couldn't update the color scheme of dwm off pywal. The trigger Modkey+Shift+F5 doesn't work inside dwm so I became confused. (Again, check my build for debugging, I got no time debugging it further because of me powering off the computer due to hardware issue not related to the keyboard, might add)

I also checked the Xresources and it didn't seem to match with Xrdb.c, so I was pretty much confused. It seems like either 2 solutions to this exists:

  1. Use Xresources instead of Xrdb
  2. Workarounds (which for some reason doesn't work on my setup)

I use python311-pywal, the latest one. I don't really know if it's a Xepyhr specific issue because I don't really want to have 2 dwm binaries on my system for debugging until later on (because I work on two branches, I moved the base to flexipatch to streamline my own pipeline)

speedie1337 commented 1 year ago

I see. Thanks for the explanation!