Closed kmarzic closed 1 year ago
Thanks for reporting, I'll consider this as a genuine bug.
We have bespoke resource strings being configured like this:
https://github.com/bakkeby/dusk/blob/052bc0ebd126d6b000502399fdb9a1ce1c9b578f/config.def.h#L121-L128
Unintuitively, these resource strings will be prefixed with dusk.
when they are looked up. This was actually intentional in order for all resource strings used to be specific to the window manager.
E.g. the config of:
{ "mfact", FLOAT, &mfact },
would be defined as:
dusk.mfact: 0.35
This was also to allow for a different colour scheme to be used for other uses of dmenu while sticking with a similar look and feel when triggering dmenu_run
via the window manager.
The cause of dusk using the default colours when spawning dmenu in this case is that the resource templates do not define resources such as dusk.dmenu.norm.bg.color
.
To address this I am going to drop the behaviour of prefixing the resource string defined in the resources
array. That seems overall more intuitive as well as more flexible.
NB: the passing of -fn
, -nb
, -nf
, -sb
and -sf
arguments to dmenu is primarily to be in line with what dwm is doing, i.e. it should work just fine with any version of dmenu.
If you use the Xresources patch for dmenu then in principle you would not need any of this.
On that topic the dmenu resource strings that are exposed in template.txt are specific to my bespoke build of dmenu. The resource strings used in dmenu-flexipatch expand on the pattern defined in the original xresources patch.
If you use dmenu-flexipatch then you may want to adjust the template to use the resource strings from that build instead.
! === dmenu colors ===
dmenu.foreground: BASE_FOREGROUND
dmenu.background: BASE_BACKGROUND
dmenu.selforeground: SELECTED_FOREGROUND
dmenu.selbackground: SELECTED_BACKGROUND
dmenu.bordercolor: BORDER
dmenu.outforeground: MARKED_FG_COLOR
dmenu.outbackground: MARKED_BG_COLOR
dmenu.midforeground: SELECTED_FOREGROUND
dmenu.midbackground: SELECTED_BACKGROUND
dmenu.selhlforeground: URGENT_FG_COLOR
dmenu.selhlbackground: URGENT_BG_COLOR
dmenu.hlforeground: MARKED_FG_COLOR
dmenu.hlbackground: MARKED_BG_COLOR
#ifdef WARNING_FG_COLOR
dmenu.hpforeground: WARNING_FG_COLOR
#endif
#ifdef WARNING_BG_COLOR
dmenu.hpbackground: WARNING_BG_COLOR
#endif
Hi,
Thanks @bakkeby for fix! It seems it is working now: dmenu is showing colors defined in Xresources.
Quick test (colors from solarized-light.res
theme):
$ while [ 1 ]; do ps -auxwww | grep dmenu | grep -v grep; sleep 1; done
admkrem+ 1900206 0.0 0.0 17944 6152 ? R 06:30 0:00 dmenu -fn DejaVuSansMono Nerd Font:size=10:antialias=true:autohint=true:style=regular -nb #fdf6e3 -nf #586e75 -sb #dc322f -sf #002b36
admkrem+ 1900206 5.0 0.0 21892 8932 ? S 06:30 0:00 dmenu -fn DejaVuSansMono Nerd Font:size=10:antialias=true:autohint=true:style=regular -nb #fdf6e3 -nf #586e75 -sb #dc322f -sf #002b36
admkrem+ 1900206 2.5 0.0 21892 8932 ? S 06:30 0:00 dmenu -fn DejaVuSansMono Nerd Font:size=10:antialias=true:autohint=true:style=regular -nb #fdf6e3 -nf #586e75 -sb #dc322f -sf #002b36
admkrem+ 1900206 1.6 0.0 21892 8932 ? S 06:30 0:00 dmenu -fn DejaVuSansMono Nerd Font:size=10:antialias=true:autohint=true:style=regular -nb #fdf6e3 -nf #586e75 -sb #dc322f -sf #002b36
^C
Closing this issue...
Working now, closing this issue...
Hi,
It looks like that
dusk
is using default colors fordmenu
instead of specific theme colors (e.g.solarized-light.res
).Patches used by
dmenu
:Xdefaults includes:
Xdefaults
dmenu
variables:In
dmenu
process output, used are default colors (defined inconfig.h
indusk
directory) and not from xresources :Best regards