trayscale
trayscale copied to clipboard
cmd/trayscale: clean up data flow
Thanks to the Prefs()
rework from #18, data flow from Tailscale to the UI is a tad strange. It mostly comes from the status, but a few items are from prefs instead, and those are being pulled on demand during the update. This is rather odd, so here's the current plan to fix it:
- [ ] Move status fetching into the GTK event and rework polling loop to just be a simple timer that fires the custom GTK update event.
- [ ] Poll prefs at the beginning of the event.
- [ ] Manually update switches directly via return values from methods.