mirror of
https://github.com/polybar/polybar.git
synced 2026-02-10 04:15:39 +00:00
This adds a new `tray-foreground` config option, and uses it instead of the `tray-background` setting to build up the `_NET_SYSTEM_TRAY_COLORS` property. I'm pretty sure that the previous behavior was a mistake (this was introduced in94298741b6which is a pretty large diff). For me and some other people, this results in a black icon being drawn on top of a black background, which is pretty useless! I would say that this diff fixes https://github.com/polybar/polybar/issues/2235. Note: the old code dealt with `unsigned int` and maxed values out at 0xff. The new code deals with `uint16_t` and maxes values out at 0xffff. I haven't found the relevant documentation to justify this change, but from manually testing, I'm pretty confident this is the right change. This all matches pretty closely with this code from i3: [`i3bar/src/xcb.c::init_tray_colors` code](43e805a00d/i3bar/src/xcb.c (L1490-L1522)), which you can see also uses the bar's foreground color and maxes values out at 0xffff, not 0xff. If you merge this up, I think we should also update https://github.com/polybar/polybar/wiki/Configuration#bar-settings to mention the new settings. Fixes #2235