polybar: Tray doesn't use icon color from gtk theme
Describe the issue
I using dark background on polybar, and dark gtk-3 theme that sets all symbolic icons color to white. Also i using icon theme with light symbolic icons by default, but as fallback (if needed icon not found) it using “hicolor” icon theme with default dark icons. On polybar tray i see all that icons in they default color.
Expected behavior:
I expected that polybar will take into account gtk theme and change icons color according to it. For example gnome and cinnamon are doing that for they own status bars. Really it’s not so important to polybar get color from gtk-3 theme (but it will be perfect variant), i just need a way to change icon color.
Actual behavior:
Polybar just don’t changing color for symbolic icons in tray. So icons that my main theme includes are white, other icons are black.
To Reproduce
It happens even with default polybar config. No matter what background or foreground color i set or what is my current gtk-3 theme.
Polybar Log
I removed all custom scripts and leaved only basic modules, and got this log on start:
polybar|warn: pulseaudio: using default sink alsa_output.pci-0000_00_05.0.iec958-stereo
polybar|error: tray: Failed to put tray above 0x1000001 in the stack (XCB_MATCH (8))
Second error appears only when i (re)start i3 with polybar.
Screenshots

Environment:
- WM: I3
- Distro: Linux mint 20
- Output of
polybar -vvv:
polybar 3.4.3
Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard
X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor
Build type: None
Compiler: /usr/bin/c++
Compiler flags: -g -O2 -fdebug-prefix-map=/build/polybar-udaYph/polybar-3.4.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wpedantic
Linker flags: -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (11 by maintainers)
Commits related to this issue
- Add support for a `tray-foreground` setting. The previous implementation was (mistakenly) using the `tray-background` setting to build up the `_NET_SYSTEM_TRAY_COLORS` property, but that would mean t... — committed to jfly/polybar by jfly 3 years ago
- Add support for a `tray-foreground` setting. The previous implementation was using the `tray-background` setting to build up the `_NET_SYSTEM_TRAY_COLORS` property. I'm pretty sure that was a mistake... — committed to jfly/polybar by jfly 3 years ago
- Add support for a `tray-foreground` setting. 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. ... — committed to jfly/polybar by jfly 3 years ago
- Add support for a `tray-foreground` setting. (#2552) 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` ... — committed to polybar/polybar by jfly 3 years ago
- Use symbolic tray icons This was a massive rabbithole. It all started with pasystray 0.8, which switched to using a symbolic icon, which didn't show up at all (https://github.com/christophgysin/pasys... — committed to jfly/dotfiles by jfly 3 years ago
Same issue, can’t get icons to become white no matter how hard I try.
No, not yet sorry. I’m really busy atm and there are some things that I need/want to do for 3.6