timothycrosley / streamdeck-ui

A Linux compatible UI for the Elgato Stream Deck.
https://timothycrosley.github.io/streamdeck-ui/
MIT License
1.14k stars 242 forks source link

Implement icon updating upon SIGUSR1 #252

Open mfgcb opened 2 years ago

mfgcb commented 2 years ago

As someone else suggested, I implemented an icon reload function upon receiving SIGUSR1 signals.

The function loads the STATE_FILE, checks if the str() for each button has changed and invokes set_button_icon() if so.

If any changes occurred, the api.state is updated and the UI buttons are redrawn to stay in sync.

This would be used by manipulating the STATE_FILE JSON externally and then calling "kill -USR1 pgrep streamdeck" to trigger the reload.

coolapso commented 1 year ago

HI, seems the main project as reached a stale state as the project owner seems to have disappeared, and we are trying to keep it alive.

you are welcome to participate in the discussion here: https://github.com/timothycrosley/streamdeck-ui/issues/357 so we can actually decide a path forward and hopefully accept your contribution into it.

coolapso commented 1 year ago

@mfgcb feel free to move this PR to: https://github.com/streamdeck-linux-gui/streamdeck-linux-gui

please be sure to read the new contribution guide specially in regard to git commits.