stream-pi / server

Stream-Pi Server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Have different icons for buttons depending on status or script

gsterling opened this issue · comments

Problem

When toggling the microphone with an action, it would be nice, if it was possible to change the icon to "On" or "Off" depending on the current state of the mic.

I can imagine it's too complicated to have this automatically, but it would suffice to add an alternative version of an icon (or multiple) and a script that changes it depending on state.

Example solution

Add an additonal field to the action configuraton like "Alternative Icons". Let it open another window or view, where you can add something between 1 and 100 different icons and assign IDs for those.
Below it add "Alternative Icon Switch", which is a script that either returns the ID, which switches to this exact icon or only outputs the desired ID to stdout. The stdout approach would allow different IDs, that weren't simply integers between 0 and 255 and could actually be strings like "mic_off" or "stream running".
It could either be run on click or periodically. Mabye add an option to select one or even both at the same time.