omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Tray icons are only tinted when the icon name ends in -symbolic

Open hayarza opened this issue 3 months ago • 4 comments

What happened

The bar recolors its own glyphs to stay legible when transparency is toggled, but tray icons are only tinted when the icon name ends in -symbolic. Apps that advertise a non-symbolic icon name are rendered as-is, so they cannot follow the bar foreground and are unreadable in one of the two bar states.

From shell/plugins/bar/widgets/Tray.qml:

// Symbolic icons ship a fixed fill (often near-white) that the host is meant
// to recolor to its foreground; detect them by the freedesktop "-symbolic"
// name suffix so they can be tinted instead of rendered as-is.
function iconIsSymbolic(icon) {
  var name = String(icon || "").split("?")[0]
  return name.slice(-9) === "-symbolic"
}

Both tray items on this machine fail that test:

nm-applet   IconName = "nm-device-wired"
steam       IconName = "steam_tray_mono"
            IconThemePath = ~/.local/share/Steam/public

nm-applet is not niche — it is autostarted system-wide by /etc/xdg/autostart/nm-applet.desktop from network-manager-applet.

This compounds the icon-theme mismatch filed separately: with a light icon set on a dark bar the icons are invisible, and with a dark icon set they are invisible in transparent mode over a light wallpaper. There is no icon-theme choice that works for both bar states, because the icon is static and the backdrop is not.

Expected

Some fallback for non-symbolic tray icons. A few options, roughly in order of effort:

  1. Treat a monochrome icon as tintable regardless of name — many apps ship a single-color tray icon without following the -symbolic convention (steam_tray_mono literally says "mono").
  2. Prefer a -symbolic variant when the icon theme provides one for the requested name, before falling back to the literal name.
  3. Draw a subtle backdrop chip behind untintable tray icons in transparent mode, so they keep contrast without being recolored.

Steps to reproduce

  1. omarchy theme set nord
  2. Ensure an app with a non-symbolic tray icon is running (nm-applet is autostarted on most installs).
  3. Expand the bar's system tray. The icon is dark-on-dark.
  4. Override the icon theme to the dark variant: echo "Yaru-blue-dark" > ~/.config/omarchy/themes/nord/icons.theme && omarchy theme set nord
  5. The icon is now legible on the solid dark bar.
  6. Double-click the bar to enable transparency over a light wallpaper. The same icon is now light-on-light and unreadable.

The bar's own font glyphs remain legible throughout, which is the contrast that makes the gap obvious.

System

  • Omarchy 4.0.1-1 (upgraded from 3.x via omarchy-upgrade-to-quattro)
  • Kernel 7.1.9-arch1-2
  • AMD Ryzen 5 5600X, NVIDIA RTX 2060 (TU106), nvidia-open-dkms
  • Single 1920x1080 display, scale 1

hayarza avatar Aug 29 '26 00:08 hayarza

Reproduction

Stock install: omarchy 4.0.3-1, quickshell 0.3.1-1, qt6-base 6.11.2-3 (Arch + Hyprland, transparent bar). Two everyday apps hit this: ChatGPT (openai-codex-desktop 26.901.51231-1) and Proton Pass (proton-pass-bin 1.40.0).

Cause

Neither item publishes an icon name, so iconIsSymbolic()'s name.slice(-9) === "-symbolic" can never be true and the tint path is never reached. Both publish only a bitmap:

$ busctl --user get-property org.freedesktop.StatusNotifierItem-224395-1 \
    /StatusNotifierItem org.kde.StatusNotifierItem IconName
Failed to get property IconName: error occurred in Get      # property not implemented

$ busctl --user get-property org.freedesktop.StatusNotifierItem-224395-1 \
    /StatusNotifierItem org.kde.StatusNotifierItem IconPixmap
a(iiay) 1 32 32 4096 ...                                    # one 32x32 ARGB32 pixmap, no other sizes

Proton Pass (:1.1569, proton-pass-bin) is identical: no IconName, one 32x32 pixmap. So the tint depends on a name that the apps most likely to need tinting do not send.

Two things worth folding into a fix

  1. This is not a one-app edge case. Chromium's tray implementation publishes a pixmap and no IconName, so every Electron/Chromium tray app behaves this way (ChatGPT, Proton Pass, Slack, Discord, Spotify, ...).
  2. A per-item setting cannot target these apps anyway. SystemTrayItem.id is the SNI Id, and both of mine report the same value:
$ busctl --user get-property :1.1569 /StatusNotifierItem ... Id
s "chrome_status_icon_1"
$ busctl --user get-property org.freedesktop.StatusNotifierItem-224395-1 ... Id
s "chrome_status_icon_1"

Chromium hardcodes that Id, so anything keyed on it (pinned / hidden / allowlist) matches all Chromium tray apps at once. Anything that distinguishes them has to be a global tray setting rather than a per-app list.

What I tried, and why I am not sending it as a patch

Three renderings of the raw bitmaps, measured on the real bar:

  • the tray's own MultiEffect colorization - rgb = ink * luma(src), alpha untouched - drags these mid-tone icons to near-black ink (mean ~#8282a4 against a bar ink of #a9b1d6). Same "cannot lighten the source" limit as #8159, just on non-symbolic icons;
  • a flat silhouette (solid ink, the icon's alpha as the mask): pixel-exact one colour, and it throws the artwork away - the ChatGPT tile's mark and Proton Pass's inner shapes disappear;
  • luminance normalisation then colorisation: lands on the bar ink with detail kept, but it is still the widget inventing a monochrome form for art that has none, and at 12px it reads worse than the app's own drawing.

All of it was reverted; the stock widget is untouched. The gap is not a rendering bug - for an icon with no monochrome form there is nothing for the widget to switch to, which is an app-side (or contract-side) problem. Filed that side as a proposal in #11781; merge or close as you prefer.

dadofsambonzuki avatar Sep 14 '26 09:09 dadofsambonzuki

Checked against quattro at c352b62d. The report is accurate: iconIsSymbolic() in shell/plugins/bar/widgets/Tray.qml (lines 147–149) is the only thing that turns on the foreground tint, and it looks only for a name ending in -symbolic. Every tray icon, in the bar and in the manage popup, goes through that one check, so anything else is drawn exactly as the app supplies it. As the comment above says, apps that send only a pixmap (Chromium and Electron) reach the widget as an image://qspixmap/<handle>/<index> URL, so they can never pass the check.

This is the widget doing what it was written to do rather than a mistake in one place, so I have not opened a fix. Each of the three options is a decision about how tray icons should look:

  • Treating any monochrome icon as tintable means a rule for what counts as monochrome. #7191 tried this with a pixel-sampling rule and was closed by its author.
  • Swapping in a -symbolic variant can be done for named icons: look up <name>-symbolic with Quickshell.iconPath(name, true), as shell/services/AppLibrary.qml already does, and keep the original if there is none. It cannot help pixmap-only apps, though, and a symbolic icon with the same name is not guaranteed to be the same picture or mean the same status.
  • A backdrop chip changes how the bar looks.

Recolouring these icons also runs into the limit in #8159: the current tint keeps the source's lightness, so dark or mid-tone art cannot be brought up to a light foreground. #14661 changes that for symbolic icons.

On a stock ISO install I found nothing that triggers this by default. network-manager-applet is not in Omarchy's package lists and nothing autostarts nm-applet; it comes from a package you installed. Steam, Electron apps, and Cloudflare's zero-trust-connected icon (#13580, which special-cases that one name) are all real cases once they are installed.

Related: #11781 proposes a monochrome setting plus a contract apps can follow, #8844 covers the light Yaru variants on dark themes, and #8159 covers dark symbolic fills.

I reviewed this by reading the source; nothing was run on a worker, since the behaviour is clear from the code. Codex Medium reviewed it separately as a second opinion. It agreed with the diagnosis, which is worth less than it sounds because its independence is not guaranteed. On its own it worked out the pixmap URL form and how the -symbolic lookup could be done, both of which I checked against the source. Next step is the maintainer's: which of these approaches, if any, the tray should take.

omarchybot avatar Oct 09 '26 06:10 omarchybot

I run into the same problem with Steam and Claude icons

duccioa avatar Nov 09 '26 12:11 duccioa

Re-checked quattro at c6be7abb9. #14661 has now merged: symbolic icons are painted through their alpha mask, so a dark source fill can take the foreground color. It still uses the same -symbolic suffix check, leaving non-symbolic names and pixmap icons unchanged. The old colorization limitation described above no longer applies to symbolic icons; the coverage gap in this report remains.

#19257 addresses a separate problem with the foreground color selected for symbolic icons on a transparent bar. It also leaves non-symbolic icons unchanged. Their treatment still awaits the maintainer's decision discussed in #11781.

Codex High checked the source and related diffs. Opus 5.5 High and muse-wonder via pi, thinking high, reviewed them as second opinions and agreed; their independence is not guaranteed. This was source inspection only: no worker reproduction was run, and the current icon metadata from Steam and Claude was not inspected.

omarchybot avatar Nov 18 '26 02:11 omarchybot