Tray colors (technical)

Patch for COSMIC’s “Notifications Tray” panel applet (cosmic-applet-status-area). Tray icons that an app hands over as a file path keep their own colours. Upstream draws every such icon in the theme colour, so coloured tray icons (unread counts, status dots) become one flat colour. User overview: tray-colors/README.md.

How it works

Installed files

tray-colors/build.sh (run by ./install.sh tray-colors) installs:

Path What
~/.local/bin/cosmic-applet-status-area-color The patched tray applet
~/.local/share/applications/com.system76.CosmicAppletStatusArea.desktop Copy of the system entry with Exec= pointing at the patched applet. A user entry with the same id overrides the system one, so the panel config is unchanged.
~/.local/state/tray-color/built-commit Upstream commit it was built from
~/.cache/tray-color/cosmic-applets Upstream source clone

Commands

./install.sh tray-colors                build the installed cosmic-applets version + patches, install, reload the applet
./install.sh --uninstall tray-colors    back to the system tray applet
tray-colors/build.sh [--uninstall]      the same steps without the installer
tray-colors/build.sh --no-restart       install without reloading; the patched applet starts with the next login

Needs the same Rust toolchain as the taskbar, see taskbar. The applet is reloaded without restarting the panel (lib/panel-reload.sh).

Run ./install.sh --update after apt updates cosmic-applets. The taskbar’s daily check (taskbar/check.sh) notifies once this applet was built, and says whether the patch still applies. How to move the patch to a new version: patch series.

Limits