I was working on a yad command (battery notification) and came across this internal yad command (from the yad man page):
--notification
Display notification icon.
so the command:
yad --notification
sends a notification icon to the system tray. That got me thinking that yad can be used with conky so that conky can send notifications to the system tray - low battery, high cpu, that sort of thing. The goal is to make conky proactive instead of reactive (in the sense that the user needs to be reading it). That way, if a window is covering the conky, a user can still get critical information.
Proof of concept:
My usual conky with fluxbox - I have it docked in the slit so it's always visible, and use "if" to colorize the output for CPU and MEM:

Add a bit of code (snippet)-
chage:
${offset 8}${if_match ${memperc}<=50}${color7}
to
${offset 8}${if_match ${memperc}<=50}${color7}${exec yad --notification}
and sure enough, I get a notification icon (which can be changed in yad) - but the conky itself no longer displays. Same result using execpi, texeci and not docking the conky.

There has to be a way to make this work without a lot of scripting which could get cpu and mem intensive.
Thoughts?